• Resolved Carrie

    (@indigohat)


    Hi,

    I GTA is telling me I have two analytics codes on my page and GA is showing a doubling of some/most pvs.

    I have site kit installed on my site. I have no analytics code in the templates or other plugins. I do not have any analytics code in the AMP plugin (using AMP by AMP Project Contributors). My assumption is, based upon documentation that site kit will handle analytics for AMP.

    Within site kit, I have GTM, page speed insights, analytics and search console set up.

    I originally was not using GTM (I was only using page speed insights, analytics and search console). I set up 2 containers in GTM – amp and web. Each container has one analytics tag with 1 trigger. Then I added it to site kit. When I set up GTM in site kit, the analytics settings tab in site kit says ‘You’re already using Google Analytics through Google Tag Manager with the property UA-6792509-3. Site Kit will therefore not place an Analytics tag because Tag Manager already covers it.’ Seems ok.

    Initially with this setup (late Oct), everything seemed fine in GA. No doubling of pvs that I could tell. In late Dec, in my AMP plugin, I stopped forwarding all mobile visitors to AMP. About then, traffic seemed to start increasing pretty rapidly. Mid Jan is when I noticed the double pvs issue. This is the same time, using GTA that I saw that there were two analytics codes in the page… although I admit I didn’t check GTA before that point so I’m not sure whether that was the case always.

    It’s not all pvs that are being doubled but it’s most/many. I can’t tell which ones.

    When troubleshooting the double pvs issue, I tried disabling analytics in site kit and just using GTM. This fixed the ‘two analytics tag’ error that GTA was giving me.
    Almost immediately traffic dropped… but AMP traffic was no longer being tracked. In GTM settings in site kit there is both an amp and web container identified so I don’t know why that would happen but it did. So that was not the answer. I have turned analytics back on in site kit.

    So now, I’m back at square one. Any ideas?

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter Carrie

    (@indigohat)

    In the mean time, I am also doing some trial and error troubleshooting and have deleted analytics containers from GTM, leaving only amp session unification tags in the AMP container. This fixes the GTA error. Not sure how it will affect traffic… we shall see. But curious still if this is a known issue and what the actual fix is.

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for reaching out. We have an open GitHub issue which we’re currently investigating in relation to duplicate Tag Manager snippets place, you can subscribe to the below to stay informed with any updates:
    https://github.com/google/site-kit-wp/issues/2668

    In the meantime what you’ve done is a good suggested workaround, users can manually insert their Tag Manager snippets on their sites, manually insert their regular web containers for canonical URLs and their AMP container for AMP URLs.

    I will update you here also as soon as we have a fix in place for the double snippets. Many thanks for sharing your insights.

    Thread Starter Carrie

    (@indigohat)

    @jamesosborne I do see the issue you reference above on my AMP pages. Now that I have GTM analytics tags removed and am using GA via site kit, only AMP pages have duplicate tags. However, when my GTM containers have analytics page view tracking tags in them AND both GTM and analytics were active in site kit, ALL pages had duplicate tags, AMP and non-AMP, which seems to be a separate issue.

    In the mean time, I’ve deactivated all my analytics related tags in my GTM containers to fix at least the non-AMP pages. This morning, I tried deactivating analytics in site kit entirely and using manual analytics code on my desktop template and setting analytics up in the AMP plugin and for whatever reason, the AMP analytics were not working so I had to go back to site kit.

    Thread Starter Carrie

    (@indigohat)

    @jamesosborne , in reading through the github issue more carefully, I came across the steps to reproduce

    “Install the AMP plugin and set the mode to “Transitional” or “Standard”
    Install Site Kit version 1.24.0 and setup the Google Tag Manager module
    Access your site and view the snippet place via Site Kit (snippet is duplicated)”

    My amp plugin is in reader mode. The duplicate GA tags in AMP persist even if I deactivate GTM in site kit entirely (that was the first thing I tried). So I don’t think that github issue is actually what I’m experiencing… or maybe is a small part of the same bigger issue but my steps to reproduce are different.

    Here’s what I’m seeing :
    1) In reader mode in the AMP plugin with or without GTM active in site kit, site kit GA places two GA codes in AMP pages – this is the current state of my site if you want to reproduce this item on my site. GTM is NOT active currently.
    2) In reader mode in the AMP plugin, with GTM and GA active in site kit and with GA codes in GTM, site kit places two GA codes on ALL page types.

    • This reply was modified 3 years, 2 months ago by Carrie.
    Plugin Support James Osborne

    (@jamesosborne)

    Many thanks for sharing your additional findings. I’m looking at your AMP site now (reader mode) and I can also see duplicate Analytics snippet placed.

    Please allow me some time to check this from my side. While I’ll also check this with the team can you confirm that you don’t have any Analytics entries set within the AMP plugins Analytics tab?

    Thread Starter Carrie

    (@indigohat)

    @jamesosborne Can confirm – no analytics entries within the AMP plugin analytics tag. I tried that this morning (as a possible workaround to sitekit double code) and it didn’t place any code on my AMP pages. :-/ No analytics code anywhere but in site kit.

    Plugin Support James Osborne

    (@jamesosborne)

    Many thanks for the update. I’ve been able to replicate the same myself and I’m awaiting confirmation from the team. I’ll update you as soon as I have more information.

    Plugin Support James Osborne

    (@jamesosborne)

    Just to let you know that the next release of Site Kit (1.25.0) will have a fix in place for this. I’ll let you know as soon as it’s out.

    Thread Starter Carrie

    (@indigohat)

    @jamesosborne Thank you! 🙂

    Plugin Support James Osborne

    (@jamesosborne)

    @indigohat Just to let you know we’ve since addressed this with the latest version of Site Kit. Can you please download the latest version and confirm it’s working as expected?

    Thread Starter Carrie

    (@indigohat)

    @jamesosborne , this appears to have fixed the most immediate issue. With GTM either active or inactive (with no analytics tags in either the amp or web containers), in reader mode in AMP, I don’t see double tags in AMP or non-amp pages! The original issue was with analytics tags active in GTM, and with GTM and analytics active in site kit, I was seeing double tags.

    The original issue also seems to be resolved. With analytics tags in GTM and with GTM and GA active in site kit, I do not get double analytics code. However, I DID get double analytics code until I went back into site kit and edited the GA settings so that it recognized it shouldn’t place GA code anymore. Given that GTM tags could be updated at any point, my assumption would be that site kit would check periodically, and maybe it does and I just was testing faster than that period of time.

    So it appears to be all fixed – thank you so much!

    Plugin Support James Osborne

    (@jamesosborne)

    @indigohat No problem at all, thanks for helping us out while troubleshooting this issue.

    If you have a moment free we’d also love to hear how you’re finding the plugin so far, it sounds like you’ve been an advanced user for a while, making use of multiple modules.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘site kit + GTM : 2 analytics tags and some dup traffic in GA’ is closed to new replies.