Gifts

Culture

Reviews

Local Spots

How to Setup Google Analytics with Squarespace (2026 Guide)

Google Analytics

★★★★ 4.5
Analytics Data Web Analytics

Google Analytics is the most widely used web analytics platform that tracks website traffic and user behavior. It provides comprehensive…

Full Review

Squarespace

Website builder with integrated e-commerce, hosting, and domains.

All Squarespace Tools

Overview

Connecting 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.

Prerequisites

  • A Squarespace site on any plan (Commerce plans required for ecommerce tracking)
  • A Google Analytics 4 property
  • Admin access to your Squarespace site
  • The GA4 Measurement ID (starts with "G-")

Step-by-Step Setup

Step 1: Create or locate your GA4 property

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).

Step 2: Add GA4 to Squarespace

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.

Step 3: Verify tracking

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.

Step 4: Enable ecommerce tracking (Commerce plans)

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.

Step 5: Mark purchase as a conversion

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.

Step 6: Configure data retention

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.

Configuration Options

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.

What Syncs

DataDirectionFrequency
Page viewsSquarespace to GA4Real-time
Traffic sources and campaignsSquarespace to GA4Real-time
Product views and cart eventsSquarespace to GA4Real-time (Commerce plans)
Purchase revenue and itemsSquarespace to GA4Real-time (Commerce plans)
Site search queriesSquarespace to GA4Real-time

Best Practices

  • Always use UTM parameters on links in email campaigns, social media posts, and ads to accurately track traffic sources
  • Create a custom exploration in GA4 for your most important user journey (e.g., landing page to product view to purchase)
  • Set up audience definitions for remarketing: site visitors, product viewers, cart abandoners
  • Use GA4's comparisons feature to analyze behavior differences between traffic sources, devices, or customer segments
  • Review the landing page report regularly to identify your highest and lowest performing entry pages

Common Issues and Fixes

GA4 not receiving data

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.

Traffic from Squarespace editor counts as visits

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 events not tracking

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).

Advanced Configuration

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 »