Squarespace and Google Analytics: a Step-by-Step Guide

Want to know how to integrate Squarespace and Google Analytics? In this quick guide, we explain what Google Analytics is, how it can help you understand visitor activity on your website, and how to integrate the Google Analytics tracking code into your Squarespace website.

We also cover the difference between Google Analytics “Universal Analytics” tracking code and the 2020 release of “GA4” tracking code. At the time of writing, Squarespace does not offer support for GA4, so it’s important to understand the difference between these two products!

Here are the topics covered in this guide:

What is Google Analytics?

Google Analytics is a free website analytics service. By installing a short snippet of tracking code on your website, Google Analytics will collect data about your website visitors which you can access in a series of online dashboards and reports.

Google Analytics data provides insight into some important questions that will help you understand how well your website is working, including:

  • What sources are bringing visitors to your website?
  • How are visitors behaving once they land on your website?
  • What is the conversion rate for key actions on your website, like form submissions or purchases?

What about Squarespace’s built-in analytics?

Squarespace does include some basic analytics tracking without connecting Google Analytics or another third-party service. You can access this data from the “Analytics” tab of the menu in the Squarespace dashboard.

However, adding Google Analytics offers much more detailed data collection and flexibility, including the ability to:

  • Filter out internal (your own) traffic from analytics reports
  • Implement conversion tracking for custom events and goals
  • Analyze how visitors move through your site from one page to another

Google Universal Analytics vs. GA4

For many years, Google’s “Universal Analytics” (UA) tracking code has been the standard way to implement Google Analytics for websites. In October 2020, Google launched a new, separate tracking code called “Google Analytics 4” (commonly abbreviated to “GA4”), designed to improve measurement of user behavior across websites and apps. (Read more about the GA4 release from Google here.)

While Google now treats GA4 as the “default” tracking experience, they also acknowledge that GA4 is still in development and the majority of websites are still running and relying on the pre-existing Universal Analytics tracking code.

At this time, Squarespace only offers a built-in integration with the Universal Analytics tracking code. We explain how to take advantage of that built-in integration in the next section.

If you want to start testing the new GA4 tracking code as well, it is possible to install both tracking methods alongside each other if you are on a Squarespace Business plan or higher.

The important thing to remember about UA and GA4 is that data collection only starts after the tracking code is installed and active on your website. Google Analytics cannot collect retroactive data from the time period before the tracking code was installed! So if you think you might want to use UA or GA4 data in the future, take the time to start collecting that data now.

How to add Google Analytics to Squarespace (Universal Analytics)

Use this option if:

  • You are on a Squarespace Personal Plan, OR
  • You specifically want to use Universal Analytics rather than GA4 (for example, if you already had UA tracking set up on a previous website that you migrated to Squarespace)

First step: get your Google Analytics UA tracking code. If you don’t have this already, follow the detailed instructions provided by Google to create a Google Analytics account and create a “Property” for your website.

Since the implementation of GA4, you will need to use the “Advanced Options” link in the Google Analytics Property setup process to get a UA tracking code instead of GA4.

Select Advanced Options to create a Universal Analytics property

You’ll then have to enable the slider setting to “Create a Universal Analytics Property”, enter your website URL, and choose between the options to create linked UA and GA4 properties, or a UA property only.

Finish creating a Universal Analytics property

Remember, if you are on a Squarespace Personal plan, you cannot add the tracking code for a GA4 property because Squarespace Personal does not include Code Injection and Squarespace’s Google Analytics integration has not been adjusted to support GA4 yet.

Once you have your UA Tracking Code, go to the “Settings” menu and then click on “Advanced” and the “External API Keys”.

Paste your Universal Analytics code (including the UA- prefix) into the field labeled “Google Analytics Account Number” and then click save.

Add your Google Universal Analytics tracking code to Squarespace settings

How to add Google Analytics to Squarespace (GA4)

Use this option if:

  • You are on a Squarespace Business plan or higher, AND
  • You want to use Google’s recently released GA4 tracking code instead of Universal Analytics

First step: create a GA4 property for your website if you haven’t already. Google support provides detailed instructions here.

As you follow the set up instructions, you will need to enter your website URL as a “data stream” for your GA4 tracking property.

Once the property is set up, navigate to the tagging instructions section of the GA4 property settings and click on the “Add new on-page tag” option.

Under the “Global Site Tag” section, copy the entire code snippet to your clipboard.

Copy the GA4 Global Site Tag code to use on your Squarespace site

Then in your Squarespace dashboard, navigate to Settings > Advanced > Code Injection > Header, and paste the Global Site Tag code into the field. Don’t forget to Save your changes!

Paste the GA4 Global Site Tag code in your Squarespace site settings

Test your Google Analytics installation on Squarespace

For both of the methods described above, you can test the Google Analytics tracking code installation by opening your website URL in a new window, and opening the Google Analytics property “Realtime” report to see your session live.

Note that for GA4 installation, there may be a 30-minute delay before data collection starts and is visible in the Realtime traffic report.

More resources

Once you have Google Analytics installed on your Squarespace website, check out these additional resources:

Share this resource: