Google Analytics Error



  • Hey All,

    Right, I have Google Analytics modules installed, everything seems to be working just fine, if I look over at Google Analytics, everything seems to be tracking just fine as well. However I keep getting this error in Google Analytics:

    Missing Tracking Code
    error
    Page https://www.orren-life.com for property Orren Lifestyle is missing valid tracking code.

    I have repeatedly asked them to check it out, and I keep getting the same error. Anyone having the same issue? Could it be that I have the JS at the bottom of the page set?

    I have no idea how to properly fix this issue.

    Any pointers would be greatly appreciated



  • Would you happen to be using ublock origin?



  • Hey Lesley,

    Lol I had to google what that was. So no. What I must add is all the analytics seem to be showing up just fine when I look at the results and conversions, etc. Its just the message that keeps showing up in analytics that it cant find the tracking code.

    P.S. If I visit my site and visit analytics, it even shows me as a live user so something is working, I just don’t understand why this error



  • Weird, it might be something configured wrong in your account. If you use chrome you can download and install Google Tag Manager. The tag manager shows you all of the Google Tags on the page and tells you if they are working properly. It says yours is, https://www.screencast.com/t/m9QuPSU1pC8 So it makes me think you might have the account in Google Analytics either setup to http. or www. But I think its in the account since the tag seems to be working.



  • Thanks Lesley, I doubled checked the property value, and its setup for https and for www. I route everything to the www.

    What I am doing now is deactivating the Move JavaScript to the end option and will ask Google to re-check. the only hint re that is in y9ru screenshot where is says the code is outside of the head tag



  • I think that is separate. I am seeing by the tawk.to module there is another send pageview request. That might be what its picking up on, but the main script is loaded in the head tag.



  • Lesley,

    I noticed that the tawk.to account setting had the domain set without the www. Do you think this could be it, or should I rather deactivate tawk.to?



  • I don’t think that is the issue. I honestly do not know what it is, but I think its something in the GA account.



  • @lesley - just a quick side question - does the current TB version of Ganalytics has your async fix? Thank you for making anonymous IPs too!



  • Which async issue?



  • It’s not an issue - I’m talking about your async mod of the ps module where you loaded the script asynchronously. I believe it’s the same with TB module?



  • I took your advice here @lesley after I kept getting various errors in google analytics. I installed the tag manager extension to debug. Found out that I was having no http response errors on every page of my site. I ended up disabling the TB google analytics module and pasting the tag code in it’s entirety into a separate footer html module that installed with my theme. Now all works correctly.

    I’d rather be using the stock thirty bees module, or even the custom code section but I couldn’t figure out the formatting to place into the code section without the script tags.

    Perhaps someone can guide me on formatting for custom code in TB until the guys have time to see about adjusting the actual module. Here is my tag from GA (scrubbed):

    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src=“https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxx-x”></script>
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag(‘js’, new Date());

    gtag(‘config’, ‘UA-xxxxxxxx-x’);
    </script>



  • Just put that code in the header.tpl in the <head> section.
    and when you have curly braces {} in your script you should wrap it inside {literal} tag.

    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src=“https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxx-x”></script>
    <script>
    {literal}
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag(‘js’, new Date());
    
    gtag(‘config’, ‘UA-xxxxxxxx-x’);
    {/literal}
    </script>
    

 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.