Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Erin Herbert 3 posts 73 karma points
    May 25, 2017 @ 11:26
    Erin Herbert
    0

    Google Analytics working properly?

    My site has been built by a developer who I'm no longer able to get in touch with :-S I have my analytics script in my header, but I'm not convinced it's working properly given the results i'm seeing in my analytics account. Can someone offer reassurance or advice? www.wyjs.org.uk

  • Jonathan Richards 288 posts 1742 karma points MVP
    May 26, 2017 @ 10:46
    Jonathan Richards
    0

    Hi Erin,

    Well my 1 minute passing look at the page, yes there is Google Analytics running on the page and it doesn't produce any console errors (The GA doesn't, you have other errors on the page, but thats not relevant to your question)

    Here is your GA Script:-

    <!-- Google Tag Manager -->
    <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-THGKJW"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window, document, 'script', 'dataLayer', 'GTM-THGKJW');</script>
    <!-- End Google Tag Manager -->
    

    As for whether 'GTM-THGKJW' is your account, I have no way of telling.

    Cheers

    Jonathan

  • Erin Herbert 3 posts 73 karma points
    May 26, 2017 @ 11:00
    Erin Herbert
    0

    Hi Jonathan

    Thank you for that. One question: GTM-THGKJW - should that be my UA code or does it refer to something else?

    Slightly concerned that you say I have other errors on the page :-(

  • Jonathan Richards 288 posts 1742 karma points MVP
    May 26, 2017 @ 11:51
    Jonathan Richards
    0

    Hi Erin,

    Sorry I should have made it clear, the code you have on the page is using Google Tag Manager and not Google Analytics. My mistake for not picking up on that.

    You need to aim yourself towards

    https://tagmanager.google.com

    Sadly its been a bit of time since I last played with that, hence my ignorance not recognising it straight away. But from what I can google, 'GTM-THGKJW' is in the same format as other TM codes, so I have no reason to think it is invalid or wrong.

    Cheers

    Jonathan

    ps. The errors on the page, is that you are missing some style sheets, though as the page looks good, I'm guessing the style sheets aren't necessary.

  • Erin Herbert 3 posts 73 karma points
    May 26, 2017 @ 12:50
    Erin Herbert
    0

    Thanks again

    I've looked at the code and can see the bit that you've identified. In my style sheet, what follows contains what I would expect to see for a UA:

    @RenderBody()
    
    @Html.RenderJsHere()
    
    <script>
    

    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-81817189-2', 'auto'); ga('send', 'pageview');

    Is this not working as there's the GTM script above? I think I may be needing to find a developer to sort :-(

Please Sign in or register to post replies

Write your reply to:

Draft