-
Notifications
You must be signed in to change notification settings - Fork 179
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
Preview development mode warns on invalid JSON if excluding all logged in users from Analytics #7939
Comments
This would be a bug in Site Kit and should be reported there. cc @felixarntz |
@swissspidy looks like a similar issue was raised in the AMP plugin before which changed the way it handled this: The validator extension also does not flag this as invalid: Is this something different about how Web Stories is validating the markup? |
We use the same sanitizers, so there shouldn‘t be a difference. I can check next week though. cc @westonruter for thoughts just in case |
I forget what the purpose is for this Otherwise, if it just has to be some other tag that is allowed in the <meta id="__gaOptOutExtension"> |
@westonruter it is for opting out of all Google Analytics measurement in AMP.
This was what we originally planned on doing, but this fails HTML validation without additional attributes.
Yes, I found this passes the validation as well, but as far as I know the contents of the element aren't used at all, it simply relies on its presence. The AMP validator does not flag the current empty element as invalid though and we also include AMP validation in our tests so that Site Kit does not generate invalid AMP markup. Is there another form of validation that Web Stories applies? |
Then you could just add empty <meta id="__gaOptOutExtension" name="sitekit-ga-opt-out" content=""> |
A JSON+LD The Web Stories debugger doesn't seem to be differentiating between errors and warnings. But the AMP validator does: |
Bit unfortunate that the Web Stories debugger doesn't mark it as a warning as it should. Definitely confusing for users. @aaemnnosttv Are any of the suggested workarounds reasonable to add to Site Kit? e.g. adding In the meantime we could add some workaround in the Web Stories plugin for that. |
@swissspidy we've already updated the element to use a There's still some debug output that looks similar to before but the errors are different and don't seem to be related to Site Kit which might have something to do with my environment or the fact that it's mostly an empty story 😄 |
@aaemnnosttv Awesome, thanks. Those other errors you see are unrelated and caused by:
|
Closing this issue now as google/site-kit-wp#3593 was merged and this will be fixed in Site Kit 1.36 |
Bug Description
1.) Story passes AMP validator, but Story's debug mode in the story preview is outputting the below warning when you enable the option to exclude all logged in users from Analytics in Site Kit by Google:
2.) Debug mode in the story preview is outputting inconsistent warnings on refresh on the same URL as above
Inconsistent.Debug.Results.mov
Expected Behaviour
1.) The warning should not be present
2.) Debug results should be consistent.
Steps to Reproduce
Screenshots
Additional Context
related support topic: https://wordpress.org/support/topic/debug-error-issue-json/
Plugin Version:
Web Stories 1.7.2
Site Kit by Google 1.34.0
WordPress Version:
Operating System: macOS
Browser: Chrome
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance Criteria
Implementation Brief
The text was updated successfully, but these errors were encountered: