Hey there, Benjamin from Loves Data here!
Welcome back!
Today we're talking all about Squarespace and Google Analytics.
If you're using Squarespace, then you need to install Google Analytics on your site.
Yes, Squarespace does have its own analytics, which I love.
But it's not the same as Google Analytics.
You can't really drill-down in the reports, you can't link Squarespace Analytics with
Google Ads, and you can't segment your data.
So while Squarespace Analytics provides some great basic reports, they are basic.
Before we get started, I want to give a shout-out to Zutrix for sponsoring this video.
If you haven't heard of them before, Zutrix provides a complete rank tracking suite to
help you optimize your position in paid and organic search results.
It can even notify you when your keywords move up or down.
Okay, so we're going to cover four things in this video.
These are different options and you can choose what works for you.
I'm going to show you two different ways you can add Google Analytics to your Squarespace
site.
We will look at the built-in Google Analytics integration.
This is the quickest and easiest way to get up and running.
And we will also look at how we can install Google Analytics using Google Tag Manager.
Apart from how you add the tracking code to your site, there are also two versions of
Google Analytics.
There's the new version which is called Google Analytics 4 or GA4, and there's the previous
version which is called Universal Analytics.
So I will also show you how to install both versions since lots of people are using GA4
and lots of people are using Universal Analytics.
Okay, let's head to Squarespace!
To use the built-in Google Analytics integration we need to select 'Settings'... Scroll to
the bottom...
Select 'Advanced'...
And then choose 'External API Keys'...
At the top we can see the built-in option to add Google Analytics to our Squarespace
site...
To find our tracking ID, let's head to Google Analytics...
After navigating to 'Admin', we need to select 'Property Settings' in the center column...
If you only see two columns, then you're using Google Analytics 4 (or GA4).
We will cover how to install this version of Google Analytics in a moment.
For now, let's click 'Property Settings'...
And now we need to copy the tracking ID at the top...
Okay, let's head back to Squarespace...
Now we can paste the tracking ID into Squarespace...
And click 'Save'...
We've installed Google Analytics on our Squarespace site!
So that's the simplest way to get up and running, but if you want to install GA4, or you want
more flexibility, then I recommend adding Google Tag Manager to install Google Analytics.
The option we're about to look at used the 'Code Injection' feature in Squarespace.
This means you will need to be on a 'Business' or 'Commerce' plan for your Squarespace site.
Let's head back to Squarespace to see this...
We need to navigate to 'Settings'...
Then scroll to the bottom, and select 'Advanced'...
Now we choose 'Code Injection'...
This lets us add code to all of the pages of our Squarespace site.
Now let's head to Google Tag Manager to get our container code...
I've already created a Google Tag Manager container, so I'm going to click on the container
ID at the top...
We can now copy the container code...
If you're new to Google Tag Manager, then you can find links to my Google Tag Manager
tutorials and course in the description below this video...
Now that we've copied the code, let's head back to Squarespace...
We can now paste the Google Tag Manager container code into the 'Header' section...
And click 'Save'...
Now that we've installed Google Tag Manager on Squarespace it's time to configure our
tags.
Let's head back to Google Tag Manager...
We need to add our tags to Google Tag Manager and we also need to apply triggers to our
tags.
Triggers are used to control when your tags should (and shouldn't) fire on your website.
And let's create a new tag...
Let's name the tag 'Google Analytics UA'...
And let's select 'Tag Configuration'...
Now we're going to choose 'Universal Analytics' as the tag type...
We select the drop-down under 'Google Analytics Settings'...
And choose the option to create a new variable...
Let's name the variable 'Universal Analytics'...
And now we need our Google Analytics tracking ID.
This is the same as the ID we looked at previously.
Let's head back to Google Analytics to find it...
After navigating to 'Admin', we choose 'Property Settings'...
And we need to copy the tracking ID at the top...
Now let's head back to Google Tag Manager...
Let's paste our tracking ID into the variable...
And save it...
Now we need to add a trigger to our tag, so let's select 'Triggering'...
We're going to select the 'All Pages' trigger.
This will mean that our tag is added to all of the pages on our Squarespace site.
Now we can save the tag...
Let's also add a GA4 (Google Analytics 4) tag to our our squarespace site.
To do this, let's create another tag...
Let's name the tag 'Google Analytics GA4'...
And let's select 'Tag Configuration'...
And choose 'GA4 Configuration' as the tag type...
We need to find the measurement ID for our GA4 property, so let's head back to Google
Analytics...
I'm going to open my GA4 property...
If you're just getting started with GA4 and you would like to learn more, then checkout
my other tutorials and course.
I've included links in the description below this video.
You'll find lots of great resources.
Okay, so let's select 'Data Streams'...
I'm going to select my data stream...
And on the top right corner we can find our measurement ID...
Let's copy this...
And now let's head back to Google Tag Manager...
Let's paste our measurement ID into our tag...
And now let's select 'Triggering'...
And add the 'All Pages' trigger to our tag...
Now we can save our tag...
We've now added both versions of Google Analytics to our Google Tag Manager container, so let's
go ahead and click 'Preview'...
We can enter the URL of our Squarespace site...
And click 'Connect'...
Our website had loaded and we can now preview the tags that we added.
Let's select the 'Tag Assistant' tab...
We can see both of our Google Analytics tags have fired.
Now we need to head back to Google Tag Manager...
And to publish our tags to our website we need to click 'Submit'...
Name the version...
And click 'Publish'...
The tags have now been published on our Squarespace site.
If you're selling items on your Squarespace site, then using Google Tag Manager does have
some limitations.
You can add some extra code to Squarespace to capture some basic transaction details,
but if you want to report on the individual products people are purchasing, then you will
need to use the built-in Google Analytics integration.
Finally, I want to mention that if you're using the built-in integration, then please
don't add the Universal Analytics tag to Google Tag Manager, since this will double-count
each of the pages people view on your site.
And I would encourage you to only use one of the options we've covered, so either the
built-integration or Google Tag Manager.
And not both.
This will help ensure you collect accurate information about your Squarespace site.
Which option are you going to use to install Google Analytics on your Squarespace site?
I'd love to know!
Let me know in the comments below.
And if you found this video helpful, then please subscribe so I know to make more videos
like this one.
Thank you so much to Zutrix for sponsoring this video.
I'll see you in the next video!