How to configure Google Tag Manager & Google Analytics with Squarespace eCommerce.

A client using Squarespace as the eCommerce platform to sell their products online wants to track transactions via Google Analytics enhanced ecommerce. When they came to us, they had just started selling online on Squarespace and did not have any external eCommerce tracking set up.

Even if you are just a small scale business, it is still important to have a good conversion and eCommerce tracking set up through a third-party application like Google Analytics.

My client had started their own Google Ads account and had been running ads for a few weeks but didn’t know if they had been generating any sales from the ads.

Today we are going to look at setting up eCommerce conversion tracking for Squarespace using Google Tag Manager and Google Analytics. The reason we use Google Tag Manager is so we can quickly and easily add new tags as we need to and because Tag Manager has a very good debugging tool to see what events are being fired when someone is interacting with the Squarespace website.

Google Analytics is a very good free website tracking software which also has a robust eCommerce tracking functionality. It integrates with Google Ads natively, so it makes it ideal for conversion tracking on Google Ads.

Ok, let’s get started.

First up, we need the following:

Go into Google Tag Manager and get the tracking code. You should have got it when you set it up, otherwise navigate to Admin->install Google Tag Manager.

Insert it into the header section in Squarespace by navigating from the admin panel, settings->advanced->code injection

Copy and paste the first part of the tracking code here into the header section and the second part into the footer section. It should auto-save.

If you want to verify it is working correctly, you can do it via a Google Chrome extension called Google Tag Assistant (link) or you can hit preview in Google Tag Manager and open your website to check if the Debug window is open.


Let set up our first tag.

Adding Google Analytics tag to Google Tag Manager

First, add a new tag

Just a bit of housekeeping. It is best practice to name your tags with the following naming structure, so in the future when you undoubtedly come back to edit this or if someone else picks up the account, they can clearly identify what each tag does.

The tag title will be: UA – Page Views – All Pages

  • UA means universal analytics, which is the tag we are going to use.
  • Page Views is what we want to tag to track
  • All Pages means we are firing the tag on all web pages on the site.

So click on tag configuration and select Google Analytics Universal Analytics. Make sure Track Type is set to Pageview.

Next click on Google Analytics settings dropdown and select New Variable…

Here we need to get our Google Analytics tracking ID and do some configuration, so let’s jump over to that platform and make some changes.

Head to and sign in. If you have more than one account, navigate to the one we are using for our Squarespace site.

Navigate to admin and then under the property profile, go to tracking info->tracking code and find your Tracking ID.

Great, let’s head back to Google Tag Manager and put this into our variable.

Name it something like GAID or Google Analytics ID and hit save.

Now we should be back in the main tag. Click on the Triggering section.

This will be up this menu where we select All Pages and hit save.

Now publish your GTM container and we are done.

Scroll to Top