The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. Issue with GA tracking and Native AMP

    Issue with GA tracking and Native AMP

    Technical SEO Issues
    2 2 69
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • winefolly
      winefolly last edited by

      Hi everyone,

      We recently pushed a new version of our site (winefolly.com), which is completely AMP native on WordPress (using the official AMP for WordPress plugin). As part of the update, we also switched over to https. In hindsight we probably should have pushed the AMP version and HTTPS changes in separate updates.

      As a result of the update, the traffic in GA has dropped significantly despite the tracking code being added properly. I'm also having a hard time getting the previous views in GA working properly.

      The three views are:

      • Sitewide (shop.winefolly.com and winefolly.com)
      • Content only (winefolly.com)
      • Shop only (shop.winefolly.com)

      The sitewide view seems to be working, though it's hard to know for sure, as the traffic seems pretty low (like 10 users at any given time) and I think that it's more that it's just picking up the shop traffic.

      The content only view shows maybe one or two users and often none at all. I tried a bunch of different filters to only track to the main sites content views, but in one instance the filter would work, then half an hour later it would revert to no traffic. The filter is set to custom > exclude > request uri with the following regex pattern:

      ^shop.winefolly.com$|^checkout.shopify.com$|/products/.|/account/.|/checkout/.|/collections/.|./orders/.|/cart|/account|/pages/.|/poll/.|/?mc_cid=.|/profile?.|/?u=.|/webstore/.

      Testing the filter it strips out anything not related to the main sites content, but when I save the filter and view the updated results, the changes aren't reflected. I did read that there is a delay in the filters being applied and only a subset of the available data is used, but I just want to be sure I'm adding the filters correctly.

      I also tried setting the filter to predefined, exclude host equal to shop.winefolly.com, but that didn't work either.

      The shop view seems to be working, but the tracking code is added via Shopify, so it makes sense that it would continue working as before.

      The first thing I noticed when I checked the views is that they were still set to http, so I updated the urls to https. I then checked the GA tracking code (which is added as a json object in the Analytics setting in the WordPress plugin. Unfortunately, while GA seems to be recording traffic, none of the GA validators seem to pickup the AMP tracking code (adding using the amp-analytics tag), despite the json being confirmed as valid by the plugin.

      This morning I decided to try a different approach and add the tracking code via Googles Tag Manager, as well as adding the new https domain to the Google Search Console, but alas no change.

      I spent the whole day yesterday reading every post I could on the topic, but was not able to find any a solution, so I'm really hoping someone on Moz will be able to shed some light as to what I'm doing wrong.

      Any suggestions or input would be very much appreciated.

      Cheers,
      Chris (on behalf of WineFolly.com)

      1 Reply Last reply Reply Quote 0
      • KaneJamison
        KaneJamison last edited by

        Lots going on here, so, a laundry list of follow up questions and thoughts for you...

        Are you seeing AMP results showing up in the Search Console? Are you seeing them indexed as intended?

        If you're doing Native AMP, you won't be able to diagnose pages by /amp URL types of formatting. It might be worth trying to fire off an event, or custom dimension in GA, for AMP = Yes / No or something like that.

        For the sitewide view, have you tested loading pages on a private browser and incognito mobile browser and seeing if they show up in GA realtime in each of the 3 views when they're supposed to?

        It looks like you might be using Cloudflare - I haven't dealt with an AMP site that uses it, but have you checked whether there are compatibility issues or anything you need to activate?

        Are any Google Tag Manager pages set to fire on HTTPS only?

        Are any GA filters in place that specify HTTP/HTTPS that need to be broadened?

        Your Amp Analytics code seems to match the one on a site that is functioning as intended, so I don't think it's a formatting issue.

        For the GA view filter - it seems like you should be able to simply include/exclude traffic to shop.winefolly.com - why the added complexity beyond that?

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        • Amp page development issue
          livingphilosophy
          livingphilosophy
          0
          3
          30

        • Redundant Hostnames Issue in GA
          The_Sage
          The_Sage
          0
          2
          436

        • Sitemap issue? 404's & 500's are regenerating?
          jeff-rackaid.com
          jeff-rackaid.com
          0
          5
          263

        • Geo Domains & SEO Issues
          BeardoCo
          BeardoCo
          0
          2
          149

        • Do I need to add canonical link tags to pages that I promote & track w/ UTM tags?
          kchandler
          kchandler
          1
          5
          2.8k

        • Anyone having issues using Keyword Analysis and Rank tracking lately?
          KeriMorgret
          KeriMorgret
          0
          6
          549

        • Any issues with lots of pages issuing 301 redirects?
          RyanKent
          RyanKent
          0
          2
          600

        • Crawl issues/ .htacess issues
          StalkerB
          StalkerB
          0
          6
          1.1k

        Get started with Moz Pro!

        Unlock the power of advanced SEO tools and data-driven insights.

        Start my free trial
        Products
        • Moz Pro
        • Moz Local
        • Moz API
        • Moz Data
        • STAT
        • Product Updates
        Moz Solutions
        • SMB Solutions
        • Agency Solutions
        • Enterprise Solutions
        • Digital Marketers
        Free SEO Tools
        • Domain Authority Checker
        • Link Explorer
        • Keyword Explorer
        • Competitive Research
        • Brand Authority Checker
        • Local Citation Checker
        • MozBar Extension
        • MozCast
        Resources
        • Blog
        • SEO Learning Center
        • Help Hub
        • Beginner's Guide to SEO
        • How-to Guides
        • Moz Academy
        • API Docs
        About Moz
        • About
        • Team
        • Careers
        • Contact
        Why Moz
        • Case Studies
        • Testimonials
        Get Involved
        • Become an Affiliate
        • MozCon
        • Webinars
        • Practical Marketer Series
        • MozPod
        Connect with us

        Contact the Help team

        Join our newsletter
        Moz logo
        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
        • Accessibility
        • Terms of Use
        • Privacy