Optimize
3.3K members online now
3.3K members online now
Everything you need to know about setting up Optimize including creating your account and container, linking to Google Analytics and how to tag your site.
Guide Me
star_border
Reply

Inserting Optimize Snippet on Google Site or SquareSpace

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I just started working with Optimizer, but I am unable to publish any of my A/B tests because I cannot figure out how to get the Optimization snippet into SquareSpace or Google Sites.  Both of these solutions just ask for the Google Analytics tracking ID.  It then handles the rest for you.  So I am not sure how we're supposed to insert the following code into the site:

ga('require', 'GTM-********');

If someone has a work around for this I am all ears.  Thank you.

1 Expert replyverified_user

Inserting Optimize Snippet on Google Site or SquareSpace

[ Edited ]
Top Contributor
# 2
Top Contributor

I might be wrong however i dont believe Google Site's is compatible, as you are limited in adding script on the Google Sites platform

 

eta.. if you use the SquareSpace integration method of just providing the tracking id in their settings, you wont have any control over editing the code snippet.. also this method adds the Classic ga.js tracking.. not Universal analytics.js which is a prereq

 

Regarding SquareSpace, you may want to look into their Code Injection method for adding script to the <head></head> section of a site

https://support.squarespace.com/hc/en-us/articles/205815908-Using-Code-Injection

 

 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here