x

How do I install my Google Analytics UA code or Google Analytics 4 GA4 tracking code to my site?

[Note: The title of this post has been edited by a moderator.]

How can I install and use google analytics, so that I have more information about what people are doing on my blog?

Thanks Smiley Happy

30,413 Views
Message 1 of 9
Report
1 Best Answer
Square

Best Answer

For instructions on how to do this with a site built using the classic Weebly drag-and-drop website editor, see our help article on adding Google Analytics. For instructions for sites built using the Square Online editor, see the the Square support article on adding custom tracking code.

Note: If you are going to use Google Analytics 4 and want to add your GA4 tag, copy the code from Google's Google Anlaytics 4 installion guide, then replace the MEASUREMENT_ID with your own. Once you have the modified code, add it to your site following the steps in the guide above. If you are using the Square Online editor, you will want to take the modified code and add a header code field instead of using the Google Analytics field.

If you need to verify your site with Google, see the article on verifying your site with search engines. If you have a site built using the Square Online editor, see the verifying your site with search engines article in the Square support site.

View Best Answer >

30,215 Views
Message 2 of 9
Report
8 REPLIES 8

Hi @Katharina,

To add Google Analytics to your site, sign-up for an account  and add your site (ex. http://example.weebly.com) to that account. Google will provide you with a block of code to add to your site, which you'll do by going to the Settings tab and selecting the SEO section. Paste the code into either the Header or Footer area.

There are more details in our Help Center:

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

30,407 Views
Message 2 of 9
Report

I followed your instructions to set up Google Analytics.  THANK YOU.  I am wondering if I am also suppose to put the code from Google into each page.  If so, would I go to pages, select a page, advanced, header and put it there?

Thanks again!

30,231 Views
Message 2 of 9
Report
Square

Best Answer

For instructions on how to do this with a site built using the classic Weebly drag-and-drop website editor, see our help article on adding Google Analytics. For instructions for sites built using the Square Online editor, see the the Square support article on adding custom tracking code.

Note: If you are going to use Google Analytics 4 and want to add your GA4 tag, copy the code from Google's Google Anlaytics 4 installion guide, then replace the MEASUREMENT_ID with your own. Once you have the modified code, add it to your site following the steps in the guide above. If you are using the Square Online editor, you will want to take the modified code and add a header code field instead of using the Google Analytics field.

If you need to verify your site with Google, see the article on verifying your site with search engines. If you have a site built using the Square Online editor, see the verifying your site with search engines article in the Square support site.

30,216 Views
Message 2 of 9
Report

Great!  That's exactly what I did.  Thanks so much, Adam!

30,196 Views
Message 2 of 9
Report

We followed the steps on weebly but it's been a week now and no data is showing at all.

Looking at the Google Tag Management I get 2 errors.

First it finds two Google ID (I assume the other one is Weebly).

But in both IDs it finds the same error:

No HTTP detected

on the first ID (which isn't ours) it also says: Code located outside header.

28,363 Views
Message 2 of 9
Report

Hello!

It looks like you may want to get in touch with live support for this, so they can go through it step-by-step with you and find the problem.

28,361 Views
Message 2 of 9
Report

Same problem: Analytics not seeing Weebly-created site.

Solution: Analysis by a tag plugin on Google Chrome, The error message was that the code Analytics gave me for my sitre contained extra white space which prevented Analytics from seeing the site. I copied their code and ran it through the software on this site: http://www.miniwebtool.com/remove-leading-trailing-spaces/ which removed the excess space(s). After pasting the improved code into the SEO of my Weebly-created site, Analytics saw the site immediately.

21,179 Views
Message 2 of 9
Report

OMG it really works, you made my day! Thank you so much also in name of weebly, who should have done this work for us. It`s a shame we have to invest hours to figure it out on our own.

9,950 Views
Message 2 of 9
Report