-
Notifications
You must be signed in to change notification settings - Fork 336
Closed
Labels
P2Low priorityLow priorityRolloverIssues which role over to the next sprintIssues which role over to the next sprintType: BugSomething isn't workingSomething isn't working
Milestone
Description
Bug Description
1.) When you enable the option to exclude all logged in users from Analytics in Site Kit by Google, Story passes AMP validator, but Story's debug mode in the story preview is outputting the below warning


Steps to reproduce
- Go to Site Kit settings
- Click on edit Analytics > Exclude from Analytics all logged-in users
- Go to Web Stories
- Open in editor > preview a story
- See debug tab and notice invalid JSON error
Screenshots
Additional Context
Related Github issue GoogleForCreators/web-stories-wp#7939
- PHP Version:
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari] chrome
- Plugin Version [e.g. 22] 1.34.0
- Device: [e.g. iPhone6] macOS
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The GA opt-out element output for AMP should not raise any validation errors or warnings for HTML or AMP markup validation
Implementation Brief
- Merge Change AMP GA opt-out to use meta tag #3593.
See conversation on Preview development mode warns on invalid JSON if excluding all logged in users from Analytics GoogleForCreators/web-stories-wp#7939 issue for more information
Test Coverage
- No changes
Visual Regression Changes
- N/A
QA Brief
- Set up and configure Analytics to exclude tracking for logged in users (default)
- Enable Web Stories and create a new story
- Leave blank and click Preview
- On the preview screen, click the Debug tab
- Review the results, ensure the
__gaOptOutExtensionelement is not reported (there may be other validation errors/warnings not from Site Kit)
Changelog entry
- Fix AMP validation error caused by the GA opt-out snippet conditionally placed by Site Kit.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Low priorityLow priorityRolloverIssues which role over to the next sprintIssues which role over to the next sprintType: BugSomething isn't workingSomething isn't working