• Resolved Raja Anbazhagan

    (@rajaanbazhagan)


    Currently I’m using google site kit and it inserts a generic tag manager script like this.

    <amp-analytics config="https://www.googletagmanager.com/amp.json?id=GTM-TM7ZRX7" data-credentials="include" class="i-amphtml-layout-fixed i-amphtml-layout-size-defined" style="width:1px;height:1px;" i-amphtml-layout="fixed">
         <script type="application/json">
              {    
                   "optoutElementId":"__gaOptOutExtension"
              }
          </script>
    </amp-analytics>

    But in the documentation for collecting core-web-vitals I should pass more configuration.

    I get a For Google Analytics please consider using Site Kit by Google. If I try to add googleanalytics snippet from the above documentation.

    So how do I do this?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    Thanks for reaching out. The script you’re referring to with the “__gaOptOutExtension” snippet is for the logged in users opt out configuration. It’s not the primary Analytics snippet placed via Site Kit. If you disabled the option to count logged in users this particular snippet will not appear.

    But in the documentation for collecting core-web-vitals I should pass more configuration.

    Site Kit doesn’t allow for the modification of the Site Kit placed snippet, which includes a basic Analytics snippet to track visits to your site. You can however manually insert your own snippet, which Site Kit can recognize when connecting the Analytics module within the plugin.

    To do so you could disconnect the Site Kit Analytics module. After doing so manually insert the snippet from that documentation, just be sure to replace the UA-XXXXXXXXX-X reference with your own Analytics property. If you’re using the Anaytics tab within the AMP plugin to insert your snippet (as opposed to copying the snippet into your theme files) you also don’t need to include the <amp-analytics> or <script type="application/json"> tags, with more information on the AMP plugins website. Ensure you insert googleanalytics as the type, as there are numerous Analytics vendors that support AMP.

    After you’ve inserted your Analytics snippet manually, with the Core Web Vitals tracking snippets you can always reconnect the Analytics module within Site Kit, to make use of the plugins Analytics dashboards. The plugin will recognize your manually inserted snippet.

    Let me know if you have any further questions on the above.

    @rajaanbazhagan As we haven’t received a response, I’ll mark this as resolved. Feel free to open a new support topic if you continue to encounter issues, or reopen this topic and we’d be happy to assist. Thank you!

    Thread Starter Raja Anbazhagan

    (@rajaanbazhagan)

    Thanks, Bethany & James. I honestly thought I replied to this post earlier, sorry for that.

    After hitting a lot of dead ends, I realized that the problem I have right now is a usability issue with the analytics module of amp specification.

    Anyway, The Google Site Kit works as it should and I am happy to have this plugin. Thanks for the good work.

    Thanks for the update, @rajaanbazhagan, and thanks for submitting that PR for the AMP issue. Please do feel free to leave a review – we’d love to hear your feedback on the plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Core-Web-Vitals Analytics for AMP site’ is closed to new replies.