How to Add Google Analytics to Squarespace Website (UA + GA4)
In the digital age, your website is your business’s central hub.
But what good is a website without knowing whether it’s producing an ROI? As Peter Drucker wrote, “What gets measured gets managed.” If you aren’t measuring your website’s performance, how do you know if it’s a valuable marketing platform for your business?
You can’t effectively manage a website you’re not measuring, let alone know what to search engine optimize to improve its results.
In this article, I’m providing a detailed explanation on how to connect Google Analytics with Squarespace using both UA and GA4 codes.
What Is Google Analytics?
What is Google Analytics? Google Analytics is a visual data measurement tool provided by Google to help business owners analyze their website traffic and performance.
Google Analytics helps you identify where website traffic came from, how long users stayed on certain web pages, whether they completed any preset goals, along with other insightful data points.
When you run digital marketing campaigns, such as search ads or social media ads, the goal is to redirect user clicks to your website to complete a conversion (e.g., filling out a contact form). Since your website is likely your biggest lead generator, it’s helpful to have a tool like Google Analytics that measures the effectiveness of your digital marketing efforts.
Is Google Analytics Free to Use?
Yes! To create a free account, navigate to https://www.google.com/analytics/ then click the blue button, “Start for free.” If you already have a Google Analytics account, click ”Sign in to Analytics.”
I highly recommend taking advantage of this free website analytics tool. Plus, you can easily connect Google Analytics with Squarespace using Squarespace’s built-in integration with Google Analytics, which we’ll cover a bit later on in this article.
How Does Google Analytics Work?
Google Analytics generates a unique tracking code that you insert into your website’s header code, so it displays across all web pages. The code tracks various activities (e.g., clicks, session duration) and attributes (e.g., demographics, interests) of website visitors. You can even see in real-time how many people are currently viewing your web pages!
Google Analytics aggregates all of the website data it collects and groups it in five levels:
Realtime (i.e., how many people are currently on your site)
Audience (i.e., who is visiting your site)
Acquisition (i.e., where are visitors coming from)
Behavior (i.e., what are visitors doing on your site)
Conversions (i.e., what actions are visitors taking on your site)
Each of these levels includes a longer list of more granular data points, but that’s a bird’s eye view of what Google Analytics tracks.
What Is the Difference Between Universal Analytics and Google Analytics 4?
Universal Analytics
Universal Analytics (UA) debuted in 2014 to help website admins track users across the internet and various devices (mobile, desktop, and tablets). It quickly became the standard for website tracking.
If you’re using a Universal Analytics property, your code starts with UA- and is known as a tracking ID.
Google Analytics 4
The newest version of Google Analytics—Google Analytics 4 (GA4)—was released in the fall of 2020. GA4 was launched to track data across websites and apps in one stream. With it still being fairly new, not all websites have upgraded to GA4.
If you’re using a Google Analytics 4 property, your code starts with G- and is known as a measurement ID.
Universal Analytics (UA) vs. Google Analytics 4 (GA4)
To clarify, GA4 isn’t an upgrade from UA; it’s a completely different data model.
Universal Analytics properties collect data known as “hits,” while Google Analytics 4 properties capture website data as “events.” According to Google, the fundamental difference between Universal Analytics and Google Analytics 4 is GA4’s event-driven data model.
We won’t go into detail about the differences between Universal Analytics and Google Analytics 4 in this blog. If you’d like to learn more, visit Google’s documentation: [UA→GA4] Universal Analytics versus Google Analytics 4 data.
Setting Up Google Analytics on Squarespace (UA + GA4)
Does Squarespace Work With Google Analytics 4?
Yes, Squarespace works with Google Analytics 4. At the beginning of 2022, Squarespace launched built-in support for Google Analytics 4 measurement IDs in addition to existing Universal Analytics tracking properties.
Speaking of which, let’s transition into setting up Google Analytics in Squarespace using both Universal Analytics and Google Analytics 4 properties.
How to Setup Universal Analytics in Google Analytics (UA)
Login to Google Analytics
From your Home Dashboard, navigate to “Admin,” found at the bottom of the left sidebar
3. Click “Tracking Info.” The fourth option down in the middle column, “Property”
4. Click “Tracking Code”
5. Copy your “Tracking ID” number, starting with “UA-” then follow the directions below to learn how to add Google Analytics code to Squarespace using Universal Analytics.
How to Install Google Analytics on Squarespace (UA)
Login to your Squarespace website
Go to “Settings” > “Advanced” > “External API”
Paste your Universal Analytics property ID under the box, “Google Analytics,” starting with UA-
4. Remember to click “Save”
How to Setup Google Analytics 4 in Google Analytics (GA4)
Login to Google Analytics
Navigate to “Admin” in the lower left corner
Click “GA4 Setup Assistant”
4. Click “Get Started”
5. A pop up window will appear. When prompted, click “Create property”
6. You will see your unique Property ID listed under “Connected Property.” Copy this ID number then follow the directions below to learn how to install Google Analytics 4 on Squarespace.
How to Install Google Analytics 4 on Squarespace (GA4)
Login to Squarespace
Go to “Settings” > “Advanced” > “External API”
To add Google Analytics 4 in addition to Universal Analytics on Squarespace, paste your GA4 measurement ID, starting with G- followed by a comma before your UA- tracking ID.
4. Click “Save.”
Congrats! You’ve just connected Squarespace and Google Analytics. Need help setting up Google Analytics on Squarespace? Reach out to Selah Creative Co.