• Resolved Joe Westcott

    (@redredweb)


    Hi, I’m having a problem where Tag Assistant reports a “non-standard implementation” and analytics.js appears twice within <head> when I inspect the DOM using Developer Tools.

    I’m running a test site with no plugins except Site Kit, and the TwentyTwenty stock WordPress theme, in order to rule out code problems and plugin problems.

    I’ve set up Site Kit so that GTM is the only connected service, apart from Search Console. I can’t seem to avoid the Search Console setup when I configure the plugin.

    In my test GTM account, I only have a few custom items:

    1. A Google Analytics variable.
    2. A Google Optimize tag with no trigger.
    3. A Google Analytics tag that uses the standard Page View trigger, with a dependency that tells it to fire Optimize first.

    I’m using test accounts for GTM, GA, and Optimize, in order to rule out issues with my production Google accounts.

    And despite this very stock, very limited test setup, I still see a double analytics.js script within the head, and Tag Assistant reports a “non-standard implementation”.

    If I run a test Optimize experiment, then on the experiment page, Tag Assistant reports that GA is recording double page views.

    Thank you for any help that you can provide!

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Joe Westcott

    (@redredweb)

    Whatever it’s worth, I searched this forum before reporting this problem.

    I found a note from four months ago that the “non-standard implementation” warning was a known issue, but there was no mention of whether it’s been fixed in the past four months. So I’m not sure whether I’m affected by a known issue or whether the Tag Assistant error is specific to my setup.

    I also found mentioned of the double script problem, but no solutions that seemed to apply here, so I’d appreciate any help!

    Thread Starter Joe Westcott

    (@redredweb)

    @redredweb thanks for reaching out and for the details!

    Search Console is required for Site Kit setup, so that’s why you are not able bypass it.

    When I currently view the site, I’m not seeing the double Analytics tag in the head of the document like in your screenshot. I do see Site Kit’s snippet for Tag Manager inserted in the source code though.

    Tag Assistant is pending an upgrade to better detect Tag Manager and Global Site Tag implementations and we’re in contact with their team for improvements for Site Kit detection.

    To ensure your pages are tracking, you could visit the site while logged out of WordPress and check the Analytics Real Time report to see if it detects your visit.

    Thread Starter Joe Westcott

    (@redredweb)

    Hi Renee! Thank you for taking my support request.

    You won’t see analytics.js twice in the source code because GTM is pushing GA to the site, which basically happens after the source code loads.

    However, if you open your browser developer tools and inspect the DOM, you should see the double analytics.js script in the <head> at that point.

    @redredweb thanks for the clarification! So I am able to recreate the same with not just Site Kit’s code snippet, but also with another plugin method as well as manually inserting the code in the active theme’s header.php file.

    This question might be better addressed by Tag Manager Help. I’ll also confer with the team to see if they have any insight.

    Thread Starter Joe Westcott

    (@redredweb)

    Thank you, Renee! I posted to Tag Manager Help almost a week ago and there’s been no reply, so it’s great that you see the problem as well, and that it’s not just me.

    Here’s the question that I posted to Tag Manager Help:
    https://support.google.com/tagmanager/thread/78426577?hl=en

    Thread Starter Joe Westcott

    (@redredweb)

    https://www.dropbox.com/s/jhwjodzecvdjh0r/google-site-kit-gtm-preview-multiple-installations-detected-google-tag-manager.png?dl=0

    If it helps, when I enter Debug / Preview Mode in Tag Manager, then Tag Assistant states that there are multiple instances of GTM on the page. This only happens when in debug / preview mode. Please see attached screenshot of the problem.

    Presumably, Site Kit is doing this — adding multiple GTM instances to the page — because this is a stock install of WordPress with no custom code and no plugins apart from Site Kit.

    FYI, from 2020/10/22 – 10/27, there was a message in Optimize that there were problems with GTM debug mode. But that message is now gone, so I’m assuming that we can trust this info from debug / preview mode.

    At the moment, I am _not_ running an Optimize experiment. I’m simply adding Optimize via a GTM tag, and GTM is configured through Site Kit.

    (edit: clarification and typo fix)

    • This reply was modified 4 years, 4 months ago by Joe Westcott.

    @redredweb thanks for the additional info and your patience as we looked into this. I’ve checked with our team and it appears the double script is more so related to GTM’s implementation (rather than unique to Site Kit).

    From testing, the secondary Analytics script is present when you configure the Optimize tag in GTM which one must connect to your Analytics Tracking ID. Once the tag is paused or removed there is only one Analytics script loaded in the DOM from the Analytics GTM tag. Tag Assistant even shows Optimize leverages the Analytics script as well (screenshot).

    Some alternatives could be to use both Site Kit’s Analytics + Optimize connections directly or insert the Optimize snippet manually if you’d prefer not to have the GTM implementation.

    In terms of the multiple instances of GTM, I cannot recreate this with just Site Kit and no longer see it on your site at the moment. Happy to take another look if this is still happening.

    Thread Starter Joe Westcott

    (@redredweb)

    Thank you, Renee. I had to repurpose the test site for something else after a couple of weeks due to a project deadline. Thank you for checking on the issue, and for following up.

    Thank you for confirming that the double analytics.js script is a known bug when following the instructions to implement Google Analytics and Google Optimize as Google Tag Manager tags. I confirmed that if I disable Optimize completely, then the second analytics.js script goes away.

    And thank you again for confirming that the “non-standard implementation” warning message is a known false positive bug in the Tag Assistant browser extension for Chrome.

    Thanks for all your help, and have a good one!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘double analytics.js and “non-standard implementation”’ is closed to new replies.