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

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.

Update: On March 16, 2022, Google announced that Universal Analytics properties will stop processing new data on July 1, 2023. This means current Universal Analytics users now have a deadline to transition to GA4 (or an alternative analytics provider). We have updated this guide to reflect the need for Google Analytics users to migrate to GA4.

If you need support migrating from UA to GA4, get in touch.

We also cover the difference between Google Analytics “Universal Analytics” tracking code and the 2020 release of “GA4” tracking code. When this article was last updated (early 2022), best practice is to collect data into both Universal Analytics AND GA4 properties at the same time. Keep reading to understand the difference between these two products and what lies ahead as GA4 matures and becomes Google’s primary analytics technology.

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
  • Track user actions and conversions on your website that are relevant to you
  • Analyze how visitors move through your site from one page to another

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?

If you are new to Google Analytics are implementing GA for the first time, you can skip over the following sections comparing the UA and GA4 versions. Click here to go right to step-by-step instructions for a first-time installation of Google Analytics 4.

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.

With the clock ticking for current Universal Analytics users, it is important to develop a plan to migrate analytics data collection and reporting to GA4.

However, there are three important things to bear in mind when planning your transition from Universal Analytics to GA4:

  1. GA4 uses a completely different data model to Universal Analytics, so many data points that you may be familiar with in Google Analytics are no longer available, or are collected in a different way. One example: “bounce rate” is no more in GA4!
  2. There is no pathway to migrate historical data from a Universal Analytics property to GA4, because the data model is so different. Google is unlikely to take away access to historical data collected in Universal Analytics properties any time soon, but there will be a break in your ability to compare data over time when you make the switch.
  3. Data collection into a new GA4 property only starts when you add the new GA4 tracking code to your website. There is nothing stopping you running Universal Analytics and GA4 at the same time, so our advice is to get a new GA4 property up and running as soon as possible so that when you eventually switch to full reliance on GA4 you have as much historical data collected as possible.

As we help more of our clients migrate to Google Analytics 4 we are adding to our resource guide covering the differences between Google Analytics 4 and Universal Analytics. Check out this guide for a more detailed feature comparison and links to new resources to help you get the most from GA4.

When should I add Google Analytics 4 to Squarespace?

Short answer: Now.

Because the data models are completely different, it is not possible to “upgrade” from a Universal Analytics tracking property to a GA4 tracking property and bring all your years of UA data with you. For this reason, we recommend switching to a “dual tagging” configuration as soon as possible.

Dual Tagging means collecting data into a Universal Analytics AND a GA4 property at the same time, so you can start building up a history of data in your new GA4 property.

This means you can continue using the Universal Analytics reports and metrics you are used to in the short term. And when you’ve wrapped your head around the new power that GA4 brings and you’re ready to make the switch, you’ll already have months (or even a year) of data in your new GA4 property.

As noted above, Google announced that Universal Analytics properties will stop collecting new data on July 1, 2023. At some date after that (yet to be announced), historical data collected in Universal Analytics properties will also no longer be available.

How to add Google Analytics to Squarespace (GA4 only)

If you are just getting started with Google Analytics, skip Universal Analytics and simply follow the Google Analytics instructions to create a new GA4 property.

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 GA4 property is created, click on the Data Streams item under the property menu and then click the right-facing arrow on the web data stream you created for your website.

(If you don’t see any data streams here, click the blue Add Stream button and add a Web data stream for your website.)

Select your GA4 website data stream

On the Web data stream screen that opens up, click the button to copy the measurement ID to your clipboard. The measurement ID starts with a G- followed by a series of numbers and letters.

Copy your GA4 measurement ID

Next, open your Squarespace dashboard and use the menu to navigate to Settings > Developer Tools > External API Keys.

Paste your GA4 measurement ID into the field labeled Google Analytics, and click Save at the top of the menu panel.

Paste the GA4 measurement ID in the Squarespace settings panel

How to add Google Analytics to Squarespace (Universal Analytics and GA4)

If you have already been using a Universal Analytics tracking property on your Squarespace website and are ready to start collecting data into a GA4 property as well, follow the steps below.

The first step is to create a new GA4 property alongside your existing Universal Analytics property.

Log in to Google Analytics click into the Admin section of your account:

Open Google Analytics admin settings

Locate the UA property that is already installed on your website under the Property dropdown menu. If you haven’t already created a GA4 property for this website, you’ll see a link to the GA4 Setup Assistant. Click that.

Open the GA4 Setup Assistant

On the next screen, click the blue Get Started button in the section labeled “I want to create a new Google Analytics 4 property.”

Follow the on-screen instructions to create a matching GA4 property. This setup wizard will create a new GA4 property but will leave your existing Universal Analytics property as is, which is what we want. Click the blue Create Property button to continue the process.

Create a new Google Analytics 4 property

Once the new GA4 property is created, click the blue button to See your GA4 Property (it will open the property in a new browser tab).

Open the new GA4 property

In the new tab for your GA4 property, scroll down to the Tag Installation section and click to open view the data streams information.

Get ready to install your GA4 property

Now, you should just see a single data stream for your website. Click the right-facing arrow on the website data stream.

Open the GA4 website data stream

On the Web data stream screen that opens up, click the button to copy the measurement ID to your clipboard. The measurement ID starts with a G- followed by a series of numbers and letters.

Copy your GA4 measurement ID

Next, open your Squarespace dashboard and use the menu to navigate to Settings > Developer Tools > External API Keys.

Add GA4 and UA tracking code to Squarespace

Squarespace allows you to add both a GA4 measurement ID and a Universal Analytics property ID in the field labeled Google Analytics. Enter the GA4 measurement ID first, followed by a comma and a space, then the Universal Analytics property ID. Click save when you’re done.

For additional details about the Squarespace integration with Google Analytics including information about how ecommerce transaction data is passed to GA, see this support article.

Remember: if you were previously using Squarespace sitewide code injection or Google Tag Manager to load Google Analytics on your website, you will need to remove this code so that Google Analytics is not loaded more than once.

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:

Need professional support with your Google Analytics implementation?

Let us support your Google Analytics migration. We can provide a customized implementation plan and training to help you unlock new insights in your website data.

Share this resource:

Copyright © 2020 – 2024 Blue Hills Digital, LLC · All Rights Reserved · Terms of Service · Privacy Policy