How do I add Google Analytics to Squarespace?

Copy your GA4 measurement ID (it starts with G-), then in Squarespace open Developer Tools, choose External API Keys and paste it in the Google Analytics account number field. Save, and turn on Squarespace’s cookie banner. Squarespace says data can take up to 24 hours to show in Google Analytics.

Create a free accountFree for up to three sites. No card needed.

Updated 1 December 2026

Step by step

  1. In Google Analytics, create a GA4 property with a web data stream and copy the measurement ID (G-…).
  2. In Squarespace, open Developer Tools and choose External API Keys.
  3. Paste the ID in the Google Analytics account number field and save.
  4. Turn on Squarespace’s cookie banner, so EU visitors can accept.
  5. Data can take up to 24 hours to appear. Check Realtime in Google Analytics after a test visit.

If you had an older ID

If the field still holds an old Universal Analytics ID (UA-…), replace it with your GA4 measurement ID.

Don’t add it twice

Squarespace says not to add Google Analytics code through code injection if you use the built-in field. Code-based setups such as Google Tag Manager are outside Squarespace’s support.

Without a banner

Google Analytics in the EU only measures people who accept cookies. If you would rather count everyone without a banner, see the Okidoki Squarespace guide.

Ask your website. Get answers right away.

Free for 3 sites. No credit card, no cookies, no code to touch.

Or look around a live demo first, no account needed →