• Resolved vhs1092

    (@vhs1092)


    there is a way to add a custom script on the story? so I need two things

    1) add comscore script

    2) on a single story, the exit button shows as display none, and seems like it’s not working anymore, so I’d like to add a custom script to enable this exit button add a listener to redirect to previous page.

Viewing 1 replies (of 1 total)
  • Plugin Author Pascal Birchler

    (@swissspidy)

    Hi there

    Adding custom JavaScript is not allowed, as that would cause AMP validation issues and thus make your story ineligible to appear on Google surfaces like Google Search or Discover. Also worth noting that there has never been an exit button on single stories anyway, so there’s no button to enable in the first place. So (2) does not work.

    For (1) you can add a custom <amp-analytics> configuration for Comscore. Here’s an example WordPress plugin that does this: https://gist.github.com/swissspidy/5f47f301889eb39ca3888a3e1fb8afb9

Viewing 1 replies (of 1 total)
  • The topic ‘Add custom script’ is closed to new replies.