How to Add GA4 to Squarespace, Step by Step

Walid Hasan8 min read
How to Add GA4 to Squarespace, Step by Step

The short answer: create a GA4 property and a web data stream, copy the measurement ID that starts with G-, and paste it into Settings → Developer tools → External API keys → "Google Analytics account number". Click Save. Do not paste the gtag snippet into Code Injection as well — Squarespace states you do not need separate script code, and adding it doubles every pageview.

The whole install is one field. What takes longer is verifying it fires once, and configuring GA4 so the data is worth looking at.

How to Add GA4 to Squarespace, Step by Step: infographic summary

The five steps, in order

  1. Create the GA4 property in Google Analytics.
  2. Add a web data stream and copy the measurement ID.
  3. Paste the ID into Squarespace's native field.
  4. Verify it is firing, and firing once.
  5. Configure internal traffic, consent, key events and the reports you will actually open.

Steps 1 to 3 take about five minutes. Step 5 is the difference between GA4 being useful and being a dashboard nobody opens.

Step 1 — Create the GA4 property

If you already have a GA4 property for this site, skip to step 2. If the only property you have is a Universal Analytics one, you need a new property — Universal Analytics properties stopped collecting data and cannot be converted.

In Google Analytics:

  1. Click Admin (the gear icon, bottom left).
  2. Click Create, then Property.
  3. Enter a property name. Use the site's domain, not "My Website" — you will thank yourself when there are six properties in the account.
  4. Set the reporting time zone and currency. Get the time zone right now: changing it later does not restate historical data, so you end up with a seam in every date-range comparison.
  5. Click Next, choose an industry category and business size.
  6. Click Next, select your business objectives.
  7. Click Create and accept the Terms of Service.

On the time zone specifically. Squarespace Analytics uses your site's configured time zone and GA4 uses the property's. If they differ, daily totals will never line up and you will spend an afternoon looking for a tracking fault that does not exist.

Step 2 — Add a web data stream and copy the measurement ID

A property collects nothing until it has a data stream.

  1. Still in Admin, under Data collection and modification, click Data streams.
  2. Click Add stream, then Web.
  3. Enter your website URL — the primary domain exactly as Squarespace serves it, including https:// and www if you use it.
  4. Give the stream a name.
  5. Leave Enhanced measurement on. It is on by default and it is what gives you scrolls, outbound clicks, site search, video engagement, file downloads and form interactions without any code.
  6. Click Create stream.
  7. On the stream details screen, copy the Measurement ID. It looks like G-XXXXXXXXXX.

That G- string is the only thing you need from Google. Ignore the "View tag instructions" panel entirely — it will offer you a gtag snippet, and on Squarespace you do not use it.

Step 3 — Paste the measurement ID into Squarespace's native field

This is the whole Squarespace side of the install.

  1. Open the Developer tools panel (Settings → Developer tools).
  2. Click External API keys.
  3. In the Google Analytics account number field, paste your measurement ID.
  4. Click Save.

Squarespace's documentation on this is unambiguous: "This is a built-in integration with Google Analytics. If you use this option, you don't need to add separate script code."

Why the field is called "account number" when you are pasting a measurement ID. The field predates GA4 and was originally built for Universal Analytics tracking IDs in the UA- format. Squarespace kept the label and changed what it accepts. A G- measurement ID is correct; a UA- ID no longer collects anything.

Native field versus Code Injection, and why the choice matters

This is the decision most guides get wrong, and it has three separate costs.

Native field (External API keys)Code Injection → Header
What you pasteThe G- measurement ID onlyThe full gtag <script> snippet
Plan requiredNo documented plan requirementCore, Plus or Advanced (plus some legacy plans)
Ecommerce dataSquarespace sends order data automaticallyNothing, unless you build it
Behaviour while logged inSquarespace registers your previews as pageviewsSuppressed when scripts are disabled in preview
Risk of double-countingNoneHigh, if the native field is also filled

The double-count is the expensive one. If the measurement ID sits in External API keys and the gtag snippet is in Code Injection, two Google tags load for the same property on every page. GA4 records two page_view events per pageview. Sessions inflate, engagement rate distorts, and every conversion rate you calculate against pageviews is halved. It looks like traffic growth, so people rarely investigate it.

The ecommerce data is the reason to prefer the native field even on Core and above. For every received order, Squarespace sends GA4 the Order ID, your store name, purchase total including shipping, the customer's city, region and country, product name and SKU. An injected gtag snippet sends none of that. You would have to build purchase events by hand in the Order Status page injection field to match it.

If you have inherited a site with both in place, remove the Code Injection snippet and keep the native field.

Step 4 — Verify GA4 is firing, and firing exactly once

Do this logged out, in a private or incognito window, on the published site. Not in the editor, not while logged in — Squarespace disables injected scripts in your editing preview and the results are meaningless.

Test one — Realtime. In GA4, go to Reports → Realtime. Browse two or three pages of your live site in the private window. Your session should appear within a minute or two. If it does, the tag is live.

Test two — DebugView, to check the count. This is the test almost nobody runs and the one that catches the double-count.

  1. Open Tag Assistant, enter your site URL and click Connect. It opens your site with debug mode enabled.
  2. In GA4, go to Admin → Data display → DebugView.
  3. Navigate one page in the Tag Assistant window.
  4. Count the page_view events in the middle "seconds" stream.

One page_view per page loaded is correct. Two means you have the tag installed twice — almost always the native field plus a Code Injection snippet, or the native field plus a Google tag deployed through Tag Manager.

Test three — the browser, if you prefer. Open developer tools on the live site, filter the Network tab for collect, and load a page. One request to google-analytics.com/g/collect carrying your G- ID is correct.

If Realtime shows your session but the standard reports are empty tomorrow, nothing is broken. Squarespace states site statistics may take up to 24 hours to populate, and GA4's standard reports process on a 24 to 48 hour cycle. Realtime and DebugView are the only near-instant surfaces.

If none of the tests show anything, work the ordered diagnostic in Squarespace GA4 not tracking — the most common cause is not a broken tag.

Step 5 — The first four things to configure

A fresh GA4 property collects data nobody can act on. These four take twenty minutes and change that.

1. Exclude your own traffic. Squarespace does not count you while you are logged in; GA4 does. Every preview you load is a pageview in GA4.

Go to Admin → Data collection and modification → Data streams → your web stream → Configure tag settings → Show more → Define internal traffic → Create. Name the rule, keep traffic_type as internal, and enter your IP address or a CIDR range.

Then go to Admin → Data collection and modification → Data filters, create an Internal Traffic filter, and switch it from Testing to Active. This second step is the one people miss — in Testing, GA4 tags the data but does not remove it. Filters take 24 to 36 hours to take effect, and an active exclude filter is permanent: excluded data is never processed and never recoverable.

Ignore any traffic on URLs ending /?sqsscreenshot=true. That is Squarespace's own tool generating your Account Dashboard thumbnail.

2. Turn on consent handling if you use a cookie banner. Squarespace's documented sequence: with the measurement ID saved, open the Cookies & Data Privacy panel, switch on the Cookie banner toggle, and switch on the Decline all button so visitors can refuse non-essential cookies. Google's consent mode then receives the choice.

Be aware of what this does to your numbers. With the Manage cookies button enabled, non-essential cookies are restricted until a visitor accepts — GA4 collects nothing from that visitor until they click. Squarespace also notes its own analytics may inflate visitor counts when cookies are declined, counting one visitor's ten pageviews as ten visitors.

3. Mark your key events. GA4 renamed conversions to key events. Decide which two or three events represent a real business outcome — a purchase, a form submission, a thank-you page view — and mark them in Admin → Data display → Events. Everything else is diagnostics.

Which events are actually available on a Squarespace 7.1 site, and how to create the ones that are not, is covered in Squarespace conversion tracking setup.

4. Check what enhanced measurement is already giving you. Before building custom events, look at what arrived free. Enhanced measurement is on by default and fires scroll, click for outbound links, view_search_results for site search, video_start / video_progress / video_complete, file_download, and form_start / form_submit.

One honest caveat on the last pair: GA4's form tracking listens for the browser's native form submit event, and Squarespace 7.1 forms submit via JavaScript. Do not assume form_submit fires — test it in DebugView by actually submitting a form on the live site. If it does not fire, a post-submit redirect to a thank-you page is the reliable alternative.

The four reports worth opening

Once data is flowing, these are the ones that answer questions. The rest of GA4 is scaffolding.

ReportWhereWhat it tells you
Traffic acquisitionReports → AcquisitionWhich channel brought sessions, and which converted. The one thing Squarespace Analytics genuinely cannot do
Landing pageReports → Engagement → Landing pageWhich entry pages carry the site. Add key events as a secondary column
RealtimeReports → RealtimeVerification, and checking a campaign is live. Not for analysis
A free-form ExplorationExploreSession source crossed with key events. This is where attribution questions get answered

Set a comparison of "last 28 days versus previous period" as your default. Absolute numbers on a small site are noise; direction is not.

Removing an old Universal Analytics setup

If the site has been around a while, check for leftovers. A UA- ID in the External API keys field collects nothing but is confusing to the next person; replace it with the G- ID. A legacy analytics.js or ga.js snippet in Code Injection → Header should be deleted outright.

While you are in the injection field, check for a stray gtag snippet with the same G- ID as your native field. That is the double-count, and it is the most common thing we find on inherited sites.

When to get help

Adding GA4 to Squarespace is genuinely a five-minute job, and the configuration afterwards is a twenty-minute one. Most site owners should do both themselves rather than pay anyone.

Where it gets harder is when the measurement has to survive something — a replatform where you need historical continuity, a multi-site structure where one property has to report on several domains, or a site where the numbers have been wrong for a year and nobody knows which of three tags is the real one. That kind of untangling is what our Squarespace SEO services handle. For a single site with a single form, the five steps above are the whole job.

FAQ

Where do I put the GA4 measurement ID in Squarespace?

Settings → Developer tools → External API keys → the "Google Analytics account number" field. Paste the G- measurement ID and save. Despite the field name, it accepts a GA4 measurement ID — the label predates GA4 and was originally for UA- tracking IDs.

Do I need Code Injection to add GA4 to Squarespace?

No, and you should not use it. The native field carries no documented plan requirement, while Code Injection needs Core, Plus or Advanced. Using both together loads two Google tags for the same property and records two page_view events per pageview.

Does Squarespace send ecommerce data to GA4 automatically?

Yes, through the native integration. For every received order Squarespace sends the order ID, store name, purchase total including shipping, the customer's city, region and country, the product name and the SKU. An injected gtag snippet sends none of that on its own.

How do I know GA4 is working on my Squarespace site?

Browse the live site logged out in a private window and check GA4's Realtime report — your session should appear within a minute or two. Then check DebugView via Tag Assistant and count page_view events: one per page is correct, two means the tag is installed twice.

Why is GA4 showing no data after I added the measurement ID?

Most often it is timing. Squarespace states statistics may take up to 24 hours to populate, and GA4 standard reports process on a 24 to 48 hour cycle. Realtime is the only near-instant check. If Realtime is also empty, you are probably testing while logged in.

How do I stop my own visits appearing in GA4?

Define internal traffic in Admin → Data streams → Configure tag settings → Define internal traffic, then create an Internal Traffic data filter and switch it from Testing to Active. In Testing it tags the data without removing it. Filters take 24 to 36 hours to take effect.

Walid Hasan
Author Bio

Walid Hasan

I'm Walid Hasan, a Certified Squarespace Expert and Squarespace Circle Platinum Partner with over 12 years of hands-on experience designing and optimizing high-performing websites. Over the years, I've had the privilege of building more than 2,000 Squarespace websites for clients around the world, always focusing on clean design, strong user experience, and conversion-driven results.

More Guides

See If Squareko Is Right For You.

Schedule a call with us to discuss your project in detail and receive a tailored solution. Let's turn your vision into reality - book your FREE consultation today!

Let’s Talk About Your Project
  • Squareko completely transformed our online presence. The new website is modern, fast, and easy to use… our site looks amazing and performs even better! ⭐⭐⭐⭐⭐
  • 𝗬𝗼𝘂𝗿 𝗽𝗵𝗼𝘁𝗼𝘀 𝗮𝗿𝗲 𝘀𝘁𝘂𝗻𝗻𝗶𝗻𝗴. 𝗬𝗼𝘂𝗿 𝘄𝗲𝗯𝘀𝗶𝘁𝗲? 𝗣𝗿𝗼𝗯𝗮𝗯𝗹𝘆 𝗻𝗼𝘁. 📷
  • 𝗥𝗲𝘀𝘁𝗮𝘂𝗿𝗮𝗻𝘁 𝗼𝘄𝗻𝗲𝗿𝘀 𝘆𝗼𝘂𝗿 𝘄𝗲𝗯𝘀𝗶𝘁𝗲 𝗶𝘀 𝘁𝗵𝗲 𝗳𝗶𝗿𝘀𝘁 𝘁𝗵𝗶𝗻𝗴 𝗮 𝗻𝗲𝘄 𝗰𝘂𝘀𝘁𝗼𝗺𝗲𝗿 𝘀𝗲𝗲𝘀 𝗯𝗲𝗳𝗼𝗿𝗲 𝘁𝗵𝗲𝘆 𝗲𝘃𝗲𝗿 𝘄𝗮𝗹𝗸 𝘁𝗵𝗿𝗼𝘂𝗴𝗵 𝘆𝗼𝘂𝗿 𝗱𝗼𝗼𝗿.
  • 𝗧𝗵𝗶𝘀 𝗶𝘀 𝘄𝗵𝗮𝘁 𝗮 𝗳𝗶𝘁𝗻𝗲𝘀𝘀 𝘄𝗲𝗯𝘀𝗶𝘁𝗲 𝘀𝗵𝗼𝘂𝗹𝗱 𝗮𝗰𝘁𝘂𝗮𝗹𝗹𝘆 𝗹𝗼𝗼𝗸 𝗹𝗶𝗸𝗲. 💪
  • 𝗦𝗾𝘂𝗮𝗿𝗲𝘀𝗽𝗮𝗰𝗲 𝗷𝘂𝘀𝘁 𝗿𝗲𝗳𝗿𝗲𝘀𝗵𝗲𝗱 𝘁𝗵𝗲 𝗖𝗶𝗿𝗰𝗹𝗲 𝗟𝗮𝗯𝘀 𝗽𝗮𝗻𝗲𝗹 — 𝗮𝗻𝗱 𝗶𝘁'𝘀 𝗮 𝗴𝗲𝗻𝘂𝗶𝗻𝗲𝗹𝘆 𝘂𝘀𝗲𝗳𝘂𝗹 𝘂𝗽𝗴𝗿𝗮𝗱𝗲.
  • 𝗔 𝘄𝗲𝗹𝗹-𝗱𝗲𝘀𝗶𝗴𝗻𝗲𝗱 𝘄𝗲𝗯𝘀𝗶𝘁𝗲 𝗵𝗲𝗹𝗽𝘀 𝗯𝘂𝘀𝗶𝗻𝗲𝘀𝘀𝗲𝘀 𝗰𝗼𝗺𝗺𝘂𝗻𝗶𝗰𝗮𝘁𝗲 𝘁𝗵𝗲𝗶𝗿 𝘃𝗮𝗹𝘂𝗲 𝗶𝗻𝘀𝘁𝗮𝗻𝘁𝗹𝘆.