Scholar

Google Analytics not working, please help

Hi all,

 

I have been trying to set up Google Analytics and it doesnt seem to be working. I have copied the Google Analytic tracking ID and also the code into the footer and header section in the SEO settings but still not luck, I have even tried to create new Google Analytic accounts and deteled the old ones, but nothing seems to be working?

 

Can anyone help?

 

Thanks 

11 REPLIES
Mayor

Re: Google Analytics not working, please help

@hangryblog

 

Website url?

Scholar

Re: Google Analytics not working, please help

Community Manager

Re: Google Analytics not working, please help

I think you might be using the wrong code for analytics, @hangryblog. Make sure you use code that looks like the code shown in our guide here:

 

http://hc.weebly.com/hc/en-us/articles/201979698-Google-Analytics

- Adam
Community Manager
Scholar

Re: Google Analytics not working, please help

Thank you for your help! I've got it working now. 

Community Manager

Re: Google Analytics not working, please help

Awesome! Glad to hear that!

- Adam
Community Manager
Scholar

Re: Google Analytics not working, please help

I have been facing the same issue. It's been two weeks, can't get Google Analytics working.

Site: www.scrummastered.com

I copied the code as stated in Google Analytics Admin panel under Tracking Info -> Tracking code:

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

gtag('config', 'hereIsMyTrackingCode');
</script>

Employee Moderator

Re: Google Analytics not working, please help

Hi @daria2b. That doesn't look like the proper code. If you check out this article it will give you exact instructions on which code to use. The code should look like this:

 

Screen Shot 2018-03-30 at 6.10.43 PM.png

 

https://hc.weebly.com/hc/en-us/articles/201979698-Google-Analytics

Scholar

Re: Google Analytics not working, please help

The code started to work after I used a program to remove white space (from another post I found on the forum, don't have the link now).

The other code is actually from Google Tag Manager which is a different thing. After all, I copied exactly the code that Google provides in the Google Analytics console that's why I was confused about why it doesn't work.

 

Community Manager

Re: Google Analytics not working, please help

Glad to hear it's working for you. I had something similar happen once in the past with some scripting code I copied from somewhere. It took me a while to figure out that one of the new lines had some white space with it.

- Adam
Community Manager