Google Analytics Plugin isn't working

Hi there,

I installed the Google Analytics plugin for my website ( https://thelanguagesherpa.com ) and followed all of the instructions but it isn’t working - I have tested it by asking people to visit the site but no analytics appear.

Also, I noticed that when visiting the site from a mobile phone a grey bar at the top of the screen appears with a googletagmanager url that is obviously not supposed to be there and is related to this problem.

Do you know where I have gone wrong in this process?

Thank you!
LS

Hello @riugn557,

Thanks for writing in! :slight_smile:

It seems that the code you’ve entered isn’t correct. Please log in to your Google Analytics account and regenerate the embed code again.

Hope this helps.

Hi Jumar,

I’ve double checked that I entered the correct embed code but it still isn’t working.

Can I please ask you to have a look inside for me?

Thank you!
LS

Hi There,

Thanks for writing in! X’s Google Analytics plugin is not designed to work with Tag Manager. Please disable our plugin and use Insert Headers and Footers plugin to add your code (https://wordpress.org/plugins/insert-headers-and-footers/).

For further reference, please check the following links as well.
(http://www.wpbeginner.com/beginners-guide/how-to-install-and-setup-google-tag-manager-in-wordpress/).

Thanks!

Hi Darshana,

I’m slightly confused here - I have another website that also uses Pro and X’s Google Analytics Plugin and everything works perfectly there.

I got the analytics code for both websites by going to Tracking Info --> Tracking Code but the codes look different for each website (I will show them in the secure note under this).

Do you know why this is the case and how I can get X’s Google Analytics plugin to work for my site, as I would rather not use the other plugin?

Thank you,
LS

Hi There,

I have checked your other site, and I can see the same issue there as well (see secure note). We have already reported this to our developers and please use the alternative solution mentioned above till we fix this on our end.

Thanks!

Hi Darshana,

Am I to understand then (based on this similar thread https://theme.co/apex/forum/t/google-analytic-plugin-strips-code/26196 ) that Google Analytics have changed the format of their tracking code from the old version that began with:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

to a new version called Global Site Tag that begins with:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=

and that X’s Google Analytics Plugin does not support the changed format at the moment?

If this is the case, are my only options to forgo GA altogether or use an alternative plugin to implement it until you have provided a fix? Do you know when this fix will be released?

Thank you,
LS

Hello,

I found that when you copy the code from google

and then paste it into X analytics, after updated the page, it losts this code:

async src=“https://www.googletagmanager.com/gtag/js?id=UA-xxxxxx-6

Hi There,

Yes, actually that’s the issue. It strips part of the code when saving.

You can either move GTM (Google Tag Manager) code along with Google Analytics to the Headers & Footers plugin or you can keep only the Google Analytics code in your Google Anayltics extension.

Once we fix this issue on our extension, you can completely utilize that plugin.

You can also check the following guide for detailed instructions.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.