Skip to content

Preview development mode warns on invalid JSON if excluding all logged in users from Analytics #7939

@LuckynaSan

Description

@LuckynaSan

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:

 INVALID_JSON_CDATA at 6:106
 The script tag contains invalid JSON that cannot be parsed

Screen Shot 2021-06-11 at 12 06 36 PM

Screen Shot 2021-06-11 at 12 08 40 PM

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

  1. Site Kit settings > edit Analytics > Exclude from Analytics all logged-in users
  2. Preview story
  3. See debug tab and notice invalid JSON error
  4. Refresh page and notice inconsistent results

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Group: IntegrationIntegration with other platforms and pluginsGroup: WordPressChanges related to WordPress or Gutenberg integrationType: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions