Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collecting Data requests fail when both Analytics and Ads modules are connected #9901

Open
2 tasks
benbowler opened this issue Dec 17, 2024 · 3 comments
Open
2 tasks
Labels
P0 High priority Team M Issues for Squad 2 Type: Bug Something isn't working

Comments

@benbowler
Copy link
Collaborator

benbowler commented Dec 17, 2024

Bug Description

When First-party mode is enabled and both the Analytics and Ads modules are connected, network requests for collecting measurement data fail. This results in 404 errors and console warnings in the browser. The issue does not occur when only the Analytics module or only the Ads module is connected.

Screenshots

Image
Image


When loading a page with FPM enabled, there are 2x 404 console errors related to tracking. It appears as though the value of FPS_PATH constant (which is PHP_FPM_REPLACE_PATH by default) is not being replaced in certain cases, here are the GET and POST endpoints in question:

https://simon-d-fpm-bug-bash.instawp.xyz/PHP_FPM_REPLACE_PATH/g/ccm/collect?en=page_view&dr=simon-d-fpm-bug-bash.instawp.xyz&dl=https%3A%2F%2Fsimon-d-fpm-bug-bash.instawp.xyz%2F&scrsrc=simon-d-fpm-bug-bash.instawp.xyz&frm=0&rnd=881594217.1734338296&dt=heavenly-goosander-92e4c9.instawp.xyz&auid=785249758.1734337691&navt=r&npa=0&did=dZTNiMT&gdid=dZTNiMT&gtm=45892e4cc1za204zb9136159890&gcd=13l3l3l3l1l1&dma=0&tag_exp=101925629~102067555~102067808~102081485~102198178&tft=1734338295774&tfd=6041&apve=1

https://simon-d-fpm-bug-bash.instawp.xyz/PHP_FPM_REPLACE_PATH/pagead/viewthroughconversion/12345/?random=1734338295771&cv=11&fst=1734338295771&bg=ffffff&guid=ON&async=1&gtm=45892e4cc1za204zb9136159890&gcd=13l3l3l3l1l1&dma=0&tag_exp=101925629~102067555~102067808~102081485~102198178&u_w=1512&u_h=982&url=https%3A%2F%2Fsimon-d-fpm-bug-bash.instawp.xyz%2F&ref=https%3A%2F%2Fsimon-d-fpm-bug-bash.instawp.xyz%2Fwp-admin%2Fadmin.php%3Fpage%3Dgooglesitekit-dashboard&hn=www.googleadservices.com&frm=0&tiba=heavenly-goosander-92e4c9.instawp.xyz&did=dZTNiMT&gdid=dZTNiMT&npa=0&auid=785249758.1734337691&uaa=arm&uab=64&uafvl=Google%2520Chrome%3B131.0.6778.140%7CChromium%3B131.0.6778.140%7CNot_A%2520Brand%3B24.0.0.0&uamb=0&uam=&uap=macOS&uapv=13.0.0&uaw=0&fledge=1&data=event%3Dgtag.config&rfmt=3&fmt=4

See the related Asana task.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • Once the issue with the FPS_PATH constant (PHP_FPM_REPLACE_PATH) replacement is resolved by the Google team, the measurement.php script in Site Kit should be updated to the latest version.
  • When First-party mode is enabled and both Analytics and Ads modules are connected:
    • Network requests for collecting measurement data should not fail.
    • There should be no 404 errors or console warnings in the browser.

Note: This issue originates from the proxy script and is not a bug in Site Kit itself. The resolution will involve updating the measurement.php script to the latest version once the fix is provided by the Google team.

Implementation Brief

  • Retrieve the latest version of the measurement.php script with the fix mentioned in the AC.
  • Replace the script at {plugin root}/fpm/measurement.php
    • Port the health check code from the current version of the script, which returns ok when the healthCheck query parameter is provided.
    • Make sure to retain the modification notice in the file header.
    • Update the @version tag in the code comment to the git hash of the new version of the measurement.php file.

Test Coverage

  • No additional test coverage required.

QA Brief

Changelog entry

@benbowler benbowler added Type: Bug Something isn't working P1 Medium priority Team M Issues for Squad 2 labels Dec 17, 2024
@hussain-t
Copy link
Collaborator

@benbowler, this issue is identical to #9903. We can close that one and consolidate the details here for clarity.

@ivonac4 ivonac4 added P0 High priority and removed P1 Medium priority labels Dec 18, 2024
@benbowler benbowler closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2024
@benbowler benbowler reopened this Dec 18, 2024
@hussain-t hussain-t assigned hussain-t and unassigned hussain-t Dec 19, 2024
@techanvil techanvil self-assigned this Dec 19, 2024
@techanvil
Copy link
Collaborator

AC ✅

@techanvil techanvil removed their assignment Dec 19, 2024
@benbowler benbowler assigned benbowler and unassigned benbowler Dec 19, 2024
@techanvil techanvil self-assigned this Dec 19, 2024
@techanvil
Copy link
Collaborator

Thanks @benbowler, the IB LGTM. It was missing an estimate so I've added one, a 7.

IB ✅

@techanvil techanvil removed their assignment Dec 19, 2024
@ankitrox ankitrox assigned ankitrox and unassigned ankitrox Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High priority Team M Issues for Squad 2 Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants