How to Set up Google Tag Manager for your Squarespace Site

Is the main purpose of your website to get new inquiries for your services?

Squarespace provides beautifully designed contact forms that you can embed on your site, and you can start tracking of who submits a form using Google Analytics.

The very first step to tracking your Squarespace contact form conversions in greater detail is to set up Google Analytics and Google Tag Manager for your website.

Related: Squarespace vs WordPress (2022)

You can track the number of visits you get on your contact page with Google Analytics, but you can also track the number of people who send you a completed form with Events via Google Tag Manager.

Tracking who completes a contact form, or which visitor “converts” into a lead can help you create more effective marketing strategies in the long-run.

Not only does tracking conversions help you monitor your progress over time, it can also become a segment in Google Analytics for more advanced analysis.

To start tracking conversions, you will have to use Google Tag Manager. It may seem a little complicated, but it’s simple if you go step by step.

  • Step 1: Create a Google Tag Manager Account
  • Step 2: Link Google Tag Manager to your Squarespace Site
  • Step 3: Start tracking Google Analytics data with Google Tag Manager
  • Step 4: Unlink your Squarespace site from Google Analytics
  • Step 5: Test and Publish your Tag

What you’re essentially doing with this exercise is sending your website page visits data to Google Analytics via Google Tag manager

In this post I’ll cover how to set up Google Tag Manager for a Squarespace site. I assume you already have a Google Analytics account. If you don’t already, start by creating a Google Analytics account.

In future posts, I’ll cover how to set up a contact form event tags and how you can set them up as goals in Google Analytics. I’ll also post about how to track embedded Acuity forms.

STEP 1 – CREATE A GOOGLE TAG MANAGER ACCOUNT

The first step to tracking events on your Squarespace site is to create an account with Google Tag Manager. (As I mentioned earlier, I’m assuming you already have a Google Analytics account which is step 0.)

Log into your Google account as usually, and then head over to Google Tag Manager. Once there, click on “Create account” and fill out your company and website information.

Geeky note: Account in Google Tag Manager is the same as Account in Google Analytics. While Container is akin to Property. In other words, Account can be the business, and then Container is for each of the company’s different websites .

STEP 2 – LINK GOOGLE TAG MANAGER TO YOUR SQUARESPACE SITE

Have Google Tag Manager, and Squarespace managing space on two separate tabs.

  • Tab 1: Go to your Squarespace admin page and open:
    • Settings > Advanced > Code Injection
  • Tab 2: Go to Google Tag Manager and open:
    • Admin > Install Google Tag Manager 

Now copy and paste as follows:

  • Copy the code from Google Tag Manager and paste into the “HEADER” space in Squarespace Code Injection
  • Copy the code from Google Tag Manager and paste into the “FOOTER” space in Squarespace Code Injection

Hit Save on the top of the Code Injection.

STEP 3 – START TRACKING GOOGLE ANALYTICS DATA WITH GOOGLE TAG MANAGER

In this step you’re going to rewire the way Squarespace sends traffic data to Google Analytics.

On your Google Tag Manager account click on “Workspace” at the very top left. Now click on “Add a new tag”

Once there, click on Tag Configuration and:

  • Select “Google Analytics – Universal Analytics” as the Tag Type
  • Leave the Track Type as “Page View”
  • Set up the Google Analytics Settings click on “new variable”
    • Enter your Google Analytics ID under Tracking ID
    • Leave auto for Cookie domain
    • Name the variable something like Google Analytics Settings
  • Now click on the Triggering space below Tag Configuration
  • Select “All Page” for Firing Triggers
  • Name your tag : Google Analytics Page View
  • Click on Save at the top right 

This is what your Google Analytics Tag should look like:

STEP 4 – UNLINK YOUR SQUARESPACE WEBSITE FROM GOOGLE ANALYTICS

To avoid potential double-counting of traffic and events you’ll need to “unlink” your Google Analytics from Squarspace. (If you don’t have it linked, skip this step and go to Step 5).

You will be collecting data via the Google Tag you just created and if you don’t delete the standard Google Analytics set up, you might double-count traffic.

Related: SEO Checklist: 10 Tips for Squarespace Bloggers

All you need to do is erase your Google Analytics ID from the Squarespace Integration. To do this go to:

  • Settings > Advanced > External API Keys
  • Erase your Google Analytics Account ID under “Google Analytics Account Number”. It should be blank like this:

STEP 5 – TEST AND PUBLISH YOUR TAG

There are different ways to test Google Tag Manager. I’m going to show you the simplest way possible.

  • On a new tab go to your website.
  • Now go to Google Analytics on a new tab. Then get on to the “Real Time” Report . You should see activity!

If you don’t see anything… remember that Real Time reports take a moment to take in the data, so just hang in there for a minute or so. If you still don’t see anything here are some pointers:

  • Google Analytics view should not exclude your IP address (this is important if you are the only visitor on your site at the moment of the testing)
  • The Google Analytics property for your view should match the property you set up on Tag Manager, as well as the ID.
  • Make sure you are following steps 1-3 as closely as possible.

Assuming that all is working well, on Google Tag Manager you are going to hit “Publish” on the far right corner. It will ask you to describe what you did, you can write something like – Google Analytics Page view tracking.

Finally, go back to your Workspace on Google Tag Manager and under the orange banner click “leave preview mode” and then “ok”.

Congratulations! You are all set up for more advanced tracking on your Squarespace site.