-
Notifications
You must be signed in to change notification settings - Fork 293
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
GA opt-out added even when no tag is set #6364
Labels
Module: Analytics
Google Analytics module related issues
P2
Low priority
Rollover
Issues which role over to the next sprint
Type: Bug
Something isn't working
Comments
aaemnnosttv
added
Type: Bug
Something isn't working
P2
Low priority
Module: Analytics
Google Analytics module related issues
labels
Jan 3, 2023
IB ✔️ |
18 tasks
@derweili is this still in progress? The PR looked like it might have been ready for review. I left one comment but otherwise LG2G 👍 |
QA Update: ✅Verified
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Module: Analytics
Google Analytics module related issues
P2
Low priority
Rollover
Issues which role over to the next sprint
Type: Bug
Something isn't working
Bug Description
Site Kit's opt-out script for GA that is used for role-based tracking exclusions is being output even when there is no tag set up yet.
In #3294 we updated the tracking opt out to use GA's property-specific method which adds a key to the
window
global that has the formga-disable-MEASUREMENT-ID
. In this case, the key is being added even though there is no measurement ID provided. This is harmless but is clearly incorrect and should be cleaned up.Steps to reproduce
ga-disable-
Screenshots
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
includes/Modules/Analytics.php
:print_tracking_opt_out()
method:$property_id
variable is assigned, check if it is empty. If$property_id
is empty, return early so that the method is terminated immediately.Test Coverage
tests/phpunit/integration/Modules/AnalyticsTest.php
:QA Brief
Tag output
Changelog entry
The text was updated successfully, but these errors were encountered: