Adding Google Analytics to Squarespace: A Beginner’s Guide

In this tutorial, you will learn exactly how to correctly add Google Analytics to your Squarespace site. It’s perfect for beginners and non-technical people.
Eduardo Yi
calendar icon
Jul 5, 2023
time icon
5 min. read
Back to Blog
Table of Contents
Primary Item (H2)

Overview

With Google Analytics (GA) on your website, you’ll be able to answer questions like:

  • Which channels (social media, Search Engine Optimization, ads, etc) are generating the most traffic and the highest conversion rates?
  • What content is attracting the most page views?
  • Which marketing campaigns are the most or least successful based on real-time metrics?
  • How many of your visitors are browsing using mobile vs desktop?
  • What are the visitor’s demographics like?

If you don’t even have a Google Analytics account yet, the whole process will take you about 15 minutes from start to finish.

Important: this process requires you to have Google Tag Manager installed on your site—this is the tool we recommend you use to install and manage all your tracking codes, including Google Analytics. If you haven’t done this, here’s a guide on how to install Google Tag Manager on a Squarespace site.

Sidenote: if you’re not a Squarespace user, check out our guides on how to add Google Analytics to WordPress or Shopify.

Let’s get started.

If you want to save this tutorial for later, you can download a copy through the form below.

Get Your Tracking ID

The first step is to grab your Universal Analytics (UA) tracking ID from your Google Analytics account.

The first step is to grab your tracking ID from your Google Analytics account.

Log into your Google Analytics account for this website, click “Admin” on the sidebar, and then click “Tracking Code” under the “Property” column.

(If you don’t have a Google Analytics account for this website yet, sign up for Google Analytics and set up your account.)

Take note of your Google Analytics tracking ID/measurement ID—the one that starts with “UA-”. You will need it for the next steps.

Installing GA Squarespace

Now it’s time to add your Google Analytics tracking code to your Squarespace website using Google Tag Manager.

Sign in to your Google Tag Manager account (if you haven’t installed Google Tag Manager on your Squarespace website, check out this tutorial), select the container that is set up on your Squarespace account, and go to “Tags”.

Click on “New” to create a new tag. It is recommended that it contains a mention to Squarespace Google Analytics, it makes it easier in the future to locate the tags you are looking for. For example, we named it “GA_TrackingCode”.

Click on the “Tag Configuration” section and select “Universal Analytics”.

You’re now going to create a “Variable” where we are going to store the Google Analytics Tracking ID.

Click on the “Google Analytics Settings” drop-down, and select “New Variable…”

First, copy the Google Analytics Tracking ID (that you took note of in the previous step).

Next, rename the variable by clicking on the text in the header section. (you will want to give it a name that easily identifies what this variable is – e.g. “GA Tracking ID”)

Finally, hit “Save”.

You will be taken back to the previous menu.

Now you will want to set up a “Trigger” for this “Tag”. To do that, click on the “Triggering” section, and once the new menu opens click “All pages”.

You are now ready to save your settings by clicking on “Save”.

If you now click on “Overview” on the sidebar, this is how your Google Tag Manager overview dashboard should look like.

If everything looks ok, you are now ready to hit “Submit”.

In the Submission Configuration panel, you will be given the chance to add a name and description to this version. After you have done so, hit “Publish”.

And that’s it! You should be all set to get detailed insights on your website traffic —now let’s make sure everything is working properly.

Checking For Errors

Lastly, let’s make sure everything is working correctly.

To test, you’ll need to install the Google Tag Assistant Extension on Google Chrome.

Once you’ve done that, open your website and click on the Google Tag Assistant icon.

Click on “Enable”.

Refresh the page and click on the Google Tag Assistant Chrome Extension again.

You should be able to see a Tag named “Google Analytics” and your Analytics Tracking ID beneath it.

This means your installation was successful!

Setup “Views” in Google Analytics

Set up your Google Analytics account like a pro.

Most people set up just one view for their Google Analytics account—it’s usually the one named “All Web Site Data”.

In Google Analytics, a “View” is like a lens through which you see all your data. For example, you could apply certain filters to a view—like a view for analyzing only existing customers, or a view for excluding traffic from your own team from your reports.

Having a single view is alright if you are 100% certain that you won’t be implementing any customizations on your Google Analytics properties. However, we recommend that you create 3 views:

  • Main View: This is your go-to view. This is where you will be doing all your analysis. All customizations to Google Analytics should have already been properly tested in the Staging View so as not to affect this view’s data.
  • Staging View: Think of this view as your sandbox. If you want to test something new but are unsure how it will affect your data (e.g: creating a new filter) you will want to do it here and give it a few days before migrating the changes to the Master View.
  • Unfiltered View: This view will be left untouched no matter what. No customizations whatsoever will be done to this view.

With this structure, you will always have a way to recover lost data in case something goes wrong. The Unfiltered View will always have all your data. And the Main View will have all your filters applied without errors.

To set up these views, go to your Google Analytics Admin page. Under “View” click on “Create View”

Insert the view details as shown below and create your “Unfiltered View”.

We’re now going to create the Staging View. To do that, select “All Web Site Data” from the drop-down. And click on “View Settings”.

Click “Copy View”.

In the “New view name” field, type “Staging View”, and click “Copy View”:

You should now have these 3 views.

Finally, rename the original “All Website Data” view and we’ll be done.

To do it, select the “All Web Site Data” view, click on “View Settings”, and rename it to “Main View”.

You should now be able to see your three views:

In Conclusion

That’s it! This is how you become a pro at adding Google Analytics to Squarespace.

If you’ve been following along, you’ve now installed Google Analytics on your Squarespace site, made sure the installation was done correctly, and set up your Google Analytics view like a pro. Here are a few more resources that might be useful:

Recommended

Double Conversions With Laser-Focused Google Analytics

Get the Ultimate Guide to Perfect Google Analytics Tracking sent to your inbox, for FREE!

X
arrow-left