Google Analytics is the most widely used web analytics platform that tracks website traffic and user behavior. It provides comprehensive…
Full ReviewConnecting Google Analytics 4 to Squarespace gives you detailed visibility into how visitors find your site, what content they engage with, and how they convert, whether your goal is ecommerce purchases, form submissions, or content engagement. Squarespace has its own built-in analytics, but GA4 provides deeper analysis capabilities, audience building for advertising, attribution modeling, and the ability to combine your Squarespace data with data from other marketing channels.
Squarespace supports GA4 through a native integration that requires only your GA4 Measurement ID. For Squarespace Commerce stores, the integration also sends ecommerce events (product views, cart actions, purchases) to GA4 automatically. The setup is quick and does not require Google Tag Manager or custom code, though both options are available for advanced tracking needs.
Go to analytics.google.com. If you need a new property, click Admin > Create Property, enter your site details, and complete the setup. Once created, go to Admin > Data Streams > Web and copy the Measurement ID (format: G-XXXXXXXXXX).
In your Squarespace dashboard, navigate to Settings > Developer Tools > External API Keys. In older Squarespace versions, this may be under Settings > Advanced > External API Keys. Find the Google Analytics Measurement ID field and paste your GA4 Measurement ID. Click Save.
Open your Squarespace site in a new browser tab. In GA4, go to Reports > Realtime. Your visit should appear within seconds. Navigate to several pages on your Squarespace site and confirm page_view events appear in the Realtime report with the correct page titles.
If you have a Squarespace Commerce plan, ecommerce events are sent to GA4 automatically once the Measurement ID is added. Verify by browsing a product page and checking GA4 Realtime for view_item events. Complete a test purchase and confirm the purchase event appears with revenue data.
In GA4, go to Admin > Events. Find the purchase event and toggle it as a key event (conversion). For non-ecommerce sites, mark relevant events like form_submit or generate_lead as conversions to track goal completions.
In GA4, navigate to Admin > Data Settings > Data Retention. Change the event data retention from the default 2 months to 14 months. This allows you to use explorations and custom reports with up to 14 months of historical data.
Squarespace sends standard GA4 events automatically: page_view for all pages, view_item for product pages, add_to_cart, begin_checkout, and purchase for Commerce stores. For custom event tracking (button clicks, video plays, scroll depth), you can add Google Tag Manager via Squarespace's Code Injection feature under Settings > Developer Tools > Code Injection. Add the GTM container snippet in the Header section. Configure cross-domain tracking in GA4 if your Squarespace site links to an external checkout or booking system.
| Data | Direction | Frequency |
|---|---|---|
| Page views | Squarespace to GA4 | Real-time |
| Traffic sources and campaigns | Squarespace to GA4 | Real-time |
| Product views and cart events | Squarespace to GA4 | Real-time (Commerce plans) |
| Purchase revenue and items | Squarespace to GA4 | Real-time (Commerce plans) |
| Site search queries | Squarespace to GA4 | Real-time |
If no data appears in GA4 Realtime after setup, verify the Measurement ID is entered correctly (should start with "G-" not "UA-"). Check that you are viewing the correct GA4 property. Clear your browser cache or test in an incognito window to ensure ad blockers are not preventing the GA4 tag from loading.
Squarespace's visual editor loads your live site, which can trigger GA4 tracking. Create a data filter in GA4 under Admin > Data Settings > Data Filters to exclude internal traffic. Define internal traffic by IP address under Admin > Data Streams > Configure Tag Settings > Define internal traffic.
Ecommerce tracking requires a Squarespace Commerce plan (Basic Commerce or Advanced Commerce). If you are on a Business plan with the commerce add-on, verify that it is properly activated. Check that products are published and visible on the live site (draft or hidden products may not fire tracking events).
For advanced tracking beyond Squarespace's native integration, implement Google Tag Manager via Code Injection. GTM enables tracking form submissions, outbound link clicks, video engagement, scroll depth, and custom button interactions. Use GA4's Measurement Protocol to send server-side events for actions that happen outside the browser (e.g., subscription renewals, refunds). Connect GA4 to Google Ads for conversion-optimized bidding and to Looker Studio for custom dashboards that combine GA4 data with other business metrics.
Google Analytics Full Review » | All Squarespace Tools »