Integrating Google Analytics with Squarespace: A Complete Guide

By Michael Turner

December 12, 2024 at 12:22 PM

Integrating Google Analytics with Squarespace allows you to track and analyze your website traffic effectively. Here's how to set it up and understand its features.

Setting Up Google Analytics

  1. Create a Google Analytics account if you don't have one
  2. Get your measurement ID (starts with G-)
  3. Add the ID to Squarespace:
    • Open Developer Tools
    • Click External API Keys
    • Enter your measurement ID
    • Save changes

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

Implementing Consent Collection

Enable Google's consent mode to manage visitor privacy:

  • Add your Analytics measurement ID
  • Enable Cookie Banner in Cookie and Visitor Data panel
  • Select Accept/Reject banner type
  • Customize banner text (optional)
  • Save settings

Managing Traffic Data

Exclude Internal Traffic:

  • Create a filter in Google Analytics to remove your IP address
  • Prevents skewed data from your own site visits

E-commerce Tracking Information:

  • Order ID
  • Store name
  • Total order amount
  • Customer location
  • Product details
  • SKU information

Key Differences Between Squarespace and Google Analytics

  1. Internal Traffic:

    • Squarespace excludes logged-in visits
    • Google Analytics counts all traffic unless filtered
  2. Bot Filtering:

    • Both platforms use different filtering methods
    • Results may vary
  3. Data Sampling:

    • Squarespace: Uses all visitor data
    • Google Analytics: May use sample-based estimates
  4. Commerce Tracking:

    • Some orders might not appear in Google Analytics
  5. Traffic Attribution:

    • Squarespace: Based on last click
    • Google Analytics: Uses multiple attribution models
  6. Location Data:

    • Both track geographical data
    • May show differences due to IP address interpretation

Removing Google Analytics

To disconnect:

  1. Open Developer Tools
  2. Click External API Keys
  3. Delete measurement ID
  4. Save changes

Ajax Loading Consideration

For Squarespace 7.0 sites using Ajax loading:

  • Google Analytics may only record initial page visits
  • Disable Ajax loading for complete tracking

Related Articles

Previous Articles