Join the Webstudio community

Updated last month

How to set up google analytics?

At a glance

The community member added the Google Analytics tag in the project settings, but it is not working. Other community members suggest adding the code in the Project Settings > General > Custom Code, which should make the code appear on all pages. However, the community member is still having issues, as the Google Analytics portal is not detecting the tags on the website.

Some community members suggest that the issue could be related to using Cloudflare, ad blockers, or the Brave browser. They recommend trying Zaraz to load the Google Analytics code or waiting a few hours for the code to be recognized. One community member was able to resolve the issue after some time, but the root cause is still unclear.

Useful resources
I've added the tag in the project settings. Is this the way to add it to every page? It isn't working, so I'm hoping someone has a different method I can try. Thanks!
2
L
C
S
11 comments
You add the code in Project Settings > General > Custom Code. The Google Analytics code then appears on all the pages.
Yeah I tried that and its not working for me. Are you adding the tag manager or just the analytics ID?
Once you add it here it will appear in all the pages. You can view the page source of each of your pages, and the script will be there.
Attachment
GAnaly.jpg
Thanks for the details @Luis
I can see these tags in my source code. However, when I tried to test these tags from the Google Analytics portal, it is not detecting them on the website
If you are using Cloudflare, it is a bit more efficient to use Zaraz to load the Google Analytics code https://developers.cloudflare.com/zaraz/

If you add Google Analytics in the custom code in Webstudio, it will still work. It can take a few hours for Google Analytics to read the code. Check today to see if it is working.
Do you have an ad blocker or using Brave? Your browser may be blocking the script which is why tests are failing
I am also having the same issue.

The GA tests aren't working. It can't find the tag.
Attachment
Screenshot_2025-01-07_at_15.17.34.png
I want to get to the bottom of this. Can you record your process and what's happening? I setup tag manager and it worked, but not google analytics. Maybe a video will help shed light on the issue
@John Siciliano Looks like all good now. GA is now working. It just took a bit more time than usual to connect.
Hm I suspect it figured out it was working as it was real data come through but something is happening with the test connection request
Add a reply
Sign up and join the conversation on Discord