Integrate Google Analytics with Squarespace: A Complete Setup Guide

By Michael Chen

December 12, 2024 at 10:58 AM

Google Analytics offers powerful tracking capabilities for Squarespace websites. Here's how to set it up and use it effectively:

Adding Google Analytics to Squarespace

  1. Create a Google Analytics account if you don't have one
  2. Get your measurement ID (starts with G-)
  3. In Squarespace, go to Development Tools > External API Keys
  4. Enter your measurement ID in the Google Analytics Account Number field
  5. Save changes

Note: Allow up to 24 hours for data to appear in your Analytics dashboard.

Setting Up Consent Management

  1. Add your measurement ID first
  2. Enable cookie banner in Cookies and Visitor Data panel
  3. Select "Opt in & out" banner type
  4. Customize banner text (optional)
  5. Save settings

Tracking Features

  • Order tracking data includes:
    • Order ID
    • Store name
    • Purchase total (with shipping)
    • Customer location
    • Product details and SKUs

Excluding Your Own Traffic

Create a filter in Google Analytics to exclude your IP address to prevent your site visits from affecting analytics data.

Key Differences Between Squarespace and Google Analytics

  • Internal traffic counting
  • Bot filtering methods
  • Data sampling approaches
  • Commerce conversion tracking
  • Traffic source attribution
  • Location data recording

Ajax Loading Consideration

For version 7.0 sites using Ajax loading, Google Analytics may only record initial page visits. Disable Ajax loading for complete tracking.

Removing Google Analytics

  1. Go to Development Tools
  2. Open External API Keys
  3. Clear the measurement ID
  4. Save changes

For optimal tracking accuracy, regularly check both Squarespace and Google Analytics data to ensure proper functionality and identify any discrepancies.

Related Articles

Previous Articles