How to add Google Analytics 4 to Squarespace
Add GA4 to a Squarespace site by pasting your G- Measurement ID into Squarespace's Google Analytics setting, or the full tag with code injection.
Squarespace has a setting for Google Analytics: open Settings → Developer tools → External API keys, paste your GA4 Measurement ID (G-…) into the Google Analytics field, and save. On plans with code injection, you can paste the full Google tag instead.
Add your Measurement ID
In Squarespace, open Settings, then Developer tools → External API keys. (On older versions, look under Settings → Advanced → External API keys.)
Paste your Measurement ID, which starts with G-, into Google Analytics account number.
Choose Save.
Or: code injection
On plans that include it, paste the full Google tag in Settings → Developer tools → Code injection → Header. Use one method only, or visits are counted twice.
Check it works
Open your site in a private window (not logged in) and GA4's Realtime overview. More ways to check.
Related
Sources
- Squarespace: Connect Google Analytics to your site
Last updated
Shopify
Connect GA4 to your Shopify store with the Google & YouTube app, which also sends purchases and other store events. Then check them in GA4's Realtime report.
Wix
Connect GA4 to your Wix site from Marketing Integrations: paste your G- Measurement ID, connect, and check that visits arrive in GA4's Realtime report.