Figment.so
BlogHow to usePricing

Connecting Google Analytics 4 to Squarespace

Squarespace connects to Google Analytics 4 through one built-in field for your GA4 measurement ID — Settings → Developer Tools → External API Keys → Google Analytics account number — and once that's saved, Squarespace says "you don't need to add separate script code." That's different from Code Injection, which is Squarespace's general-purpose place to paste a script and is where a tool like Google Tag Manager would go instead. Here's the exact setup, sourced from Squarespace's own help center, checked September 2026.

What do I need before I start?

A Google Analytics 4 property and its measurement ID. Squarespace's guide states the format directly: "Your code starts with G- and is known as a measurement ID" (Squarespace, "Using Google Analytics with Squarespace", checked September 2026). Google's own help center describes where that ID lives inside your GA4 property: under Admin → Data Streams, in your data stream's details, where you "copy the Measurement ID (starts with 'G-' or 'AW-')" (Google Analytics Help, "About tracking [Google tag ID]", checked September 2026). If you don't have a GA4 property yet, Squarespace's guide points you to sign up for one before starting the Squarespace-side steps.

One version note worth flagging up front: Squarespace confirms it only supports the current version of Google Analytics — "As of July 1, 2023, Google will only support Google Analytics 4. If you set up your integration with an older version of Google Analytics, you'll need [to] go through the setup steps below using your Google Analytics 4 Measurement ID." A leftover Universal Analytics property ID won't do anything useful here.

How do I add my GA4 measurement ID to Squarespace?

Squarespace's own steps, verbatim from its help center:

  1. Open the Developer Tools panel.
  2. Click External API Keys.
  3. In the Google Analytics account number field, enter your measurement ID.
  4. Click Save.

Squarespace states plainly what happens after that: "It may take up to 24 hours for site statistics to populate in Google Analytics." Don't judge the connection as broken based on an empty GA4 report in the first few hours.

Is this the same as Squarespace Analytics?

No, and the distinction matters. This guide is specifically about wiring your site to an outside GA4 property. Squarespace's own built-in reporting — Traffic, Traffic sources, Search keywords, Sales, and the other panels inside your site dashboard — is a completely separate system that doesn't require GA4 at all and works the moment your site has visitors. Our guide to what Squarespace Analytics shows covers what each of those built-in panels covers, which ones are gated by plan, and how far back the data goes. Connecting GA4 gives you a second, independent set of numbers in Google's own reporting tools — it doesn't feed into or replace what Squarespace's own Analytics panels already show, and Squarespace's help center is direct that "there are always variations between any two analytics platforms based on how each platform is built to calculate results," so don't expect the two to match exactly.

Why would I use Code Injection instead of the built-in field?

You wouldn't, for GA4 itself — but you might for a related tool. Squarespace's own Google Analytics guide draws this line explicitly: "This is a built-in integration with Google Analytics. If you use this option, you don't need to add separate script code. Other code-based solutions, like Google Tag Manager, fall outside the scope of our support." In other words, the External API Keys field is the supported, documented path specifically for a GA4 measurement ID — Google Tag Manager, or any other script-based tracking tool, would need to go through Code Injection's header field instead, which is a different feature entirely with its own plan requirement and limits. Our guide to Squarespace Code Injection covers exactly where each of its fields injects code, which plans include it, and where it doesn't work (checkout pages, for one).

What does the built-in connection actually do for me?

A few things beyond just sending pageviews:

  • Consent mode. If you enable your site's cookie banner (Settings → Cookies and Data Privacy) and turn on the "Decline all" button, Squarespace can pass visitor consent choices to Google through Google's consent mode, once your measurement ID is already connected.
  • Ecommerce conversion data. For a Squarespace store, Squarespace sends Google Analytics a defined set of order details on every purchase: order ID, store name, purchase total (including shipping), the customer's city/region/country, product name, and SKU.
  • A documented way to exclude your own visits. Squarespace doesn't count your own logged-in pageviews in its own Analytics, but Google Analytics does — Squarespace's guide points you to set up an IP-address filter inside Google Analytics itself if you want to exclude your own traffic there too.

What should I expect not to match between the two platforms?

Squarespace's own help page lists several specific, documented differences worth knowing before you compare numbers side by side:

  • Cookie-declined visitors: when a visitor doesn't accept analytics cookies, "Squarespace analytics may inflate visitor numbers because we can't track those visitors' behaviors" — for example, counting one 10-page visit as ten separate visitors — while Google Analytics uses behavioral modeling to estimate untracked visitor behavior instead.
  • Bot filtering: the two platforms "have different measures for filtering non-human traffic like crawlers and bots."
  • Sampling: Squarespace calculates "from your full visitor activity, no matter your audience size," while "some numbers [in Google Analytics] may be estimates based on a sample of visitors."
  • Referrer attribution: both platforms attribute a visit to a referrer based on the visitor's last click, "with some exceptions," which Squarespace says can make its own direct-traffic numbers come out higher than Google's.
  • A specific traffic-source artifact: Squarespace notes that a URL ending in /?sqsscreenshot=true showing up as a traffic source in Google Analytics is just Squarespace's own account-dashboard screenshot tool, and can be disregarded.

What if my site is on version 7.0 with Ajax loading?

This is the one scenario where the built-in connection under-counts real traffic, and Squarespace states it directly: "If you have a version 7.0 site and your template uses Ajax loading, Google Analytics won't register all of your site traffic. Ajax interferes with site analytics, only logging the first page a visitor lands on. As the visitor then navigates around your site, Analytics won't record their traffic unless they refresh the page." Squarespace's stated fix is direct too: "To avoid this issue, disable Ajax loading for your site." If your GA4 numbers look implausibly low against what Squarespace's own Traffic panel shows for the same period, an Ajax-loading 7.0 template is the first thing to check.

How do I disconnect Google Analytics later?

The same panel, run in reverse: open the Developer Tools panel, click External API Keys, delete the measurement ID from the Google Analytics account number field, and click Save. There's no separate "disconnect" button or confirmation step — clearing the field is the removal.

Where does Figment fit in?

Nowhere directly here — this guide covers Squarespace's own settings panel, and Figment doesn't have a Squarespace site to connect anything to. If you're publishing a new site from Figma through Figment's Figma plugin instead of running an existing Squarespace site, that's a separate product with its own analytics story, not a substitute for the steps above.

Bottom line: paste your GA4 measurement ID into Settings → Developer Tools → External API Keys → Google Analytics account number, wait up to 24 hours for data, and use Code Injection instead only if you specifically need Google Tag Manager or another code-based tool that Squarespace's built-in field doesn't support. If you're on an older 7.0 template with Ajax loading turned on, disable it first, or GA4 will miss most of your real traffic.


Get the latest content from Figment. Subscribe today for Figma design guides and website building tips.


Figment.so

Contact

Twitter

Pricing

Privacy

Terms