Google Analytics 4 is only useful if you can trust what it reports. On Squarespace, one of the most common reasons people stop trusting their numbers is duplicate tracking: the same visit or action is recorded twice because GA4 has been installed in more than one place.
This usually isn't anyone's fault. A site owner connects Google Analytics in Squarespace's settings. Later, a marketer adds Google Tag Manager. Someone else pastes a tracking snippet into Code Injection while testing something. Each step made sense at the time, but together they can send duplicate data to the same GA4 property.
This guide explains how the pieces fit together, how to choose one clean setup, how to install Google Tag Manager on Squarespace, and how to check that GA4 is recording each page view and event once.
Squarespace's built-in Google Analytics connection vs Google Tag Manager
There are two common ways to get GA4 running on a Squarespace site.
The built-in connection
Squarespace lets you add a Google Analytics measurement ID (it starts with G-) in the site settings, usually in the External API Keys area. Squarespace then loads the Google tag on every page for you.
This is the simplest option. It works well when you only need standard GA4 reporting and don't plan to manage other marketing tags.
Google Tag Manager
Google Tag Manager (GTM) is a container that you install once. You then manage your tags inside GTM rather than in the website code. That can include the GA4 Google tag, Google Ads conversion tags and other marketing tags.
GTM gives you more control: you decide which tags fire, when they fire, and under what consent conditions. It also adds more places where something can be configured twice.
The important point: both methods can send data to the same GA4 property. If both are active at once, GA4 receives everything twice.
Why duplicate tracking happens
Duplicate tracking usually comes from one of these situations:
The measurement ID is still in Squarespace's built-in Google Analytics field and a GA4 Google tag is also set up inside GTM.
A GA4 snippet (the gtag.js code from Google) was pasted into Code Injection or a Code Block, and GTM is also loading GA4.
Two GTM containers are installed, or the same container is installed twice (for example once in the site-wide header and again in a page's own header code).
Inside GTM, there is more than one Google tag for the same measurement ID, or an extra tag that sends a page_view event on top of the one the Google tag already sends.
A custom event (for example a form submission) is tracked in GTM, while GA4's enhanced measurement is also collecting a similar event automatically.
Why more than one GA4 installation is a problem
When GA4 is installed twice, the damage is not always obvious. The reports still show numbers. They are just the wrong numbers.
Page views can be inflated. Each page load may be counted twice, which makes views per session look higher than it really is.
Events and conversions can be counted twice. If a form submission is counted twice, your reported leads look better than reality, and any Google Ads campaign optimizing toward that conversion learns from bad data.
Engagement metrics become harder to read. Duplicate hits can distort engagement and session data, so comparisons over time become unreliable.
Consent can be bypassed by accident. If one installation respects your cookie banner and another doesn't, tracking may run before a visitor has made a choice.
Troubleshooting takes longer. When tags live in several places, nobody is sure which one to change.
Duplicate data also can't easily be corrected in GA4 after the fact. Fixing the installation stops new duplicates, but historical reports generally stay as they were.
Step 1: Choose one implementation path
There is no single correct way to install GA4 on Squarespace. What matters is choosing one path and removing the others.
Use the built-in connection if:
you only need standard GA4 reports
you aren't running Google Ads conversion tracking or other marketing tags
you want the setup with the fewest moving parts
Use Google Tag Manager if:
you track specific actions such as form submissions, phone clicks or email clicks
you use Google Ads or other platforms that need their own tags
you need more control over how tags respond to consent choices
more than one person or agency manages your marketing tags
If you choose GTM, GA4 should be loaded only through GTM. Remove the measurement ID from Squarespace's built-in field and remove any pasted GA4 snippets.
Step 2: Find out what is already installed
Before adding anything, check what is already on the site. This is the step most often skipped.
Check Squarespace's built-in Google Analytics field. Note whether a measurement ID is entered.
Check site-wide Code Injection (header and footer) for GTM snippets (they mention googletagmanager.com/gtm.js) and GA4 snippets (they mention gtag/js).
Check page-level code. Individual pages can have their own header code injection, and Code Blocks inside pages can also contain scripts.
View the page source of the live site and search for gtm.js and gtag/js. Count how many times each appears and which IDs they reference.
Check inside GTM (if you use it) for every tag that references your GA4 measurement ID.
Keep a short note of what you find and where. It makes the clean-up much easier and helps whoever works on the site next.
Step 3: Add Google Tag Manager to Squarespace
If you've chosen GTM, install the container once, site-wide.
In Google Tag Manager, open your container and copy the two installation snippets it provides.
Paste the main script snippet into Squarespace's site-wide Code Injection β Header.
The second snippet is a noscript fallback that Google suggests placing right after the opening body tag. Squarespace doesn't offer that exact spot, so it is commonly placed in the site-wide footer injection instead. It only matters for visitors with JavaScript turned off.
Don't add the container again to individual pages.
Save, then confirm the snippet appears once in the page source of the live site.
Code Injection isn't available on every Squarespace plan, so check that your plan includes it before you start.
Warning: installing the GTM container doesn't send anything to GA4 by itself. Nothing is tracked until you add a GA4 tag inside GTM and publish the container.
Step 4: Configure GA4 inside Google Tag Manager
Add one Google tag for GA4
In GTM, create a Google tag using your GA4 measurement ID and set it to fire on all pages. This tag sends a page_view automatically on each page load, so you don't need a separate page_view event tag.
Use one Google tag per GA4 measurement ID. If you find two, remove one.
Review enhanced measurement
In GA4, under your web data stream, enhanced measurement can collect events such as scrolls, outbound clicks, site search, file downloads and form interactions automatically.
That is useful, but it can overlap with custom events you build in GTM. If you add your own form-submission event, consider whether GA4's automatic form interaction events are also recording the same thing, and decide which one you'll rely on.
Check a few GA4 property settings
Data retention: the default for detailed event data is short. Many businesses extend it to the longest option available.
Internal traffic: consider defining your own team's traffic so it can be filtered out of reports.
Unwanted referrals: if visitors move to a third-party payment or booking site and back, those sites can show up as referral sources. Review this if it applies to you.
Publish the container
Changes in GTM don't reach your website until you Submit and publish a new container version. Add a short description to each version so you can see what changed and roll back if needed.
Remove the other installations
Once GTM is loading GA4, remove the measurement ID from Squarespace's built-in Google Analytics field and delete any leftover GA4 snippets from Code Injection or Code Blocks.
Step 5: Consent Mode basics
If your site shows a cookie banner, your tags should respect the choice each visitor makes. Google Consent Mode is the mechanism Google tags use to adjust their behavior based on consent.
A few practical points:
Consent defaults need to be set before any Google tags fire, not after.
Don't assume your cookie banner automatically controls tags added through GTM. Check how your banner communicates the visitor's choice. Some setups need an extra step to pass that choice to Google's Consent Mode.
Test both outcomes: accept and decline. Confirm that tags behave differently in each case.
The rules that apply to your business depend on where your visitors are and the laws that affect you. This guide isn't legal advice.
Step 6: Verify with GTM Preview
GTM's Preview mode (Tag Assistant) lets you load your site and see exactly which tags fire.
In GTM, click Preview and enter your site's address.
Load a page and select the earliest event in the timeline.
Confirm your GA4 Google tag fired once.
Check whether Tag Assistant shows more than one container or more than one Google tag ID on the page. That usually points to a leftover installation.
Click through to a second page and repeat.
Test any custom events (such as a form submission) and confirm each fires once per action.
Step 7: Verify with GA4 DebugView and Realtime
GTM Preview shows what fired. GA4 shows what was received.
While Preview mode is active, open GA4 and go to DebugView (in Admin, under the data display settings).
Load a page on your site. You should see one page_view event for each page you load.
If you see two page_view events for a single page load, something is still sending duplicates.
Use the Realtime report as a second check. It is less detailed but shows what normal visitors generate.
A useful technical check is your browser's developer tools. In the Network tab, filter for requests containing collect. Each page load should normally produce one GA4 page_view request, not two.
Keep in mind that blocked cookies, ad blockers and declined consent mean GA4 will never capture every single visit. The goal is clean, consistent data, not perfect counts.
Common troubleshooting mistakes
Leaving the built-in Google Analytics field filled in after moving to GTM. This is the most common cause of duplicates on Squarespace.
Forgetting page-level header code. A snippet added to one page months ago keeps firing on that page.
Testing changes without publishing the GTM container. Preview shows the new setup, but live visitors still get the old one.
Adding a page_view event tag on top of the Google tag, which already sends one.
Using two GA4 properties without a clear reason, so data is split and nobody knows which one is correct.
Trusting Squarespace Analytics and GA4 to match. They use different methods and won't report identical numbers. That isn't a sign of duplication.
Only testing with consent accepted. Always test the decline path too.
Not writing anything down. A short record of where each tag lives saves time for whoever touches the site next.
What this setup doesn't cover
This guide is about installing GA4 correctly and making sure data isn't duplicated. Deciding which actions should count as conversions β and how to tell real leads from noise β is a separate topic that we'll cover in a future article.
A clean installation is the foundation for that work. It also matters for the rest of your website: if you're planning a redesign or moving platforms, tracking should be part of the plan from the start rather than an afterthought. Our website design and development projects treat it that way.
If you'd like help setting up measurement properly, our analytics and conversion optimization service covers tracking setup, verification and ongoing reporting. You can also browse more practical guides in our resource library.