How to Add Google Analytics to Squarespace

Who runs the world? Data! Everyone works with data, and that includes website owners. Data is information you can use to optimize your operations for better results. And Google Analytics simplifies the process for website owners, providing deep insights into how users engage with site content. 

Adding Google Analytics to Squarespace is relatively easy if you know how to do it. Keep reading to learn the steps to add analytics on your website and begin to track users and their actions. 

Adding Google Analytics to Squarespace Website: Steps

You can add Google Analytics to your Squarespace in a few quick steps. But before you can get started, you will have to create a Google Analytics account and an analytics property that you will use on your Squarespace website.

Step One: Create a Google Analytics Account 

To Create a Google Analytics account, visit the Google Analytics website to begin the process.

Click on the Signup button and fill in all the required spaces. After completion, you will have a property name and URL, followed by your industry and time zone.

Step Two: Create a Google Analytics Property

Google Analytics property is simply a unique tracking or measurement ID that you will add to the source code of your site. This ID comes in the form of a code and will help you track user behavior on your site.

After creating a Google Analytics account, you will automatically get a Google Analytics property.

There are two types of Google Analytics properties that website owners use: Google Universal Property and Google Analytics 4.

Google Analytics 4 is the latest web tracking tool created by Google and is the default analytics property you get when you create a Google Analytics account. 

However, this does not mean you cannot have other properties. You can also add other properties to your analytics account (just like when you change your fonts on your computer).

Google Universal Property is a good addition. Although Google Analytics 4 can provide better data, Google Universal Property has a more friendly user interface.

Fortunately, both Google Universal Property and Google Analytics 4 can run side by side, so you get the best of both worlds.

Step 3: Create an Additional Property (optional)

Since Google Analytics 4 is set by default, you can add Google Universal Property to your account by following the steps below:

  • Log into your Google Analytics Account
  • Click on the Admin Cog icon; a property column will appear. You should click on “CREATE PROPERTY.”
  • A form titled Property details will pop out. Type in the name of the property you are about to create and click on “SHOW ADVANCED OPTION”
  • Toggle the button on “CREATE GOOGLE UNIVERSAL PROPERTY.” 

Once you have created a universal analytics property, you will get a unique tracking ID that begins with UA and is followed by a unique number.

You can connect both properties to your Squarespace website by adding their tracking ID to your site’s source code.

Now that you have created your Analytics property and have obtained your unique tracking ID, you are finally ready to add Google Analytics to your website. 

Two Ways to Add Google Analytics Code to Your Squarespace Website

You can add the Google Analytics property codes directly to your Squarespace site or via Google Tag Manager.

Adding Google Analytics Directly to Your Squarespace Account

Adding Google Analytics directly to Squarespace is a straightforward process, but it only works if you have a Universal Analytics property.

Since you have already created a Universal Property in your analytics account, follow the steps below:

  • Go to the Home Menu of your Squarespace site and click on Settings
  • Select the Advanced Setting Option
  • Click on External API keys
  • Click on the Google Analytics Account Number field that pops up.
  • Enter your Tracking ID, measurement ID, or both into the field.
  • Click SAVE, and your Analytics setup is good to go.

Adding Google Analytics Via Google Tag Manager

Another way you can add Google Analytics to your Squarespace site is through Google Tag Manager (GTM). Google Tag Manager is a system that allows you to easily add or update relevant codes (called tags) to your website or app.

Using Google Tag Manager to add Google Analytics to Squarespace is beneficial as it allows you to track events on your site easily. Since Google Tag Manager helps you add tags to your site quickly, you can conveniently add more tags (such as other versions of Google Analytics) as time goes on.

In addition, this method allows the use of both Google Universal Analytics Property (UA) and Google Analytics 4 (GA4)

To use this method, follow the steps below:

Step 1: Create a GTM Container

To create a GTM Container, go to Google Tag Manager. You will see a provision to create a new Google Tag Manager Container.

Copy the GTM code that is generated after creating the container.

Step 2: Add GTM Code to Squarespace

Go to your Squarespace dashboard and click on settings. Tap on Advanced and then on Code Injection.

Copy the GTM script code into the Header Section of the box. Or you can copy and paste the GTM NoScript code into the Footer Section.

Click SAVE, and your GTM Container tag will be added to your Squarespace site. 

To get accurate data from Google Analytics, it is best to set up a filter that would exclude your IP address and that of your team. This way, Google Analytics can effectively track user activity.


Adding Google Analytics to your site is a great way to monitor user activity, and you will see what type of content your audience likes and vice versa. And this information helps grow your brand through data-driven strategies.

Follow the simple steps in this article to add Google Analytics to Squarespace and begin to enjoy its many benefits.

Leave a Comment