How to Install and Configure Google Analytics on Your Squarespace Site: Complete Guide

By Michael Thompson

December 12, 2024 at 10:59 AM

Connecting Google Analytics to your Squarespace site helps track visitor data and analyze traffic patterns effectively. Here's how to set it up and use it properly.

Prerequisites

  • A Google Analytics account (sign up at Google Analytics website)
  • A Squarespace website

Adding Your Google Analytics Measurement ID

  1. Navigate to Development Tools panel
  2. Select External API Keys
  3. Enter your Google Analytics measurement ID (starts with G-) in the designated field
  4. Save changes

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

Setting Up Consent Mode

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

Tracking Features

  • Order information (ID, store name, total)
  • Customer location data
  • Product details (name, SKU)
  • Page views and visitor behavior

Removing Personal Activity Create a filter in Google Analytics to exclude your IP address to prevent your own visits from affecting data.

Key Differences Between Platforms

Internal Traffic:

  • Squarespace: Excludes logged-in activity
  • Google Analytics: Includes all traffic unless filtered

Bot Filtering: Both platforms use different methods to filter non-human traffic

Data Calculation:

  • Squarespace: Uses all visitor data
  • Google Analytics: May use sample data for large audiences

Commerce Tracking:

  • Some discrepancies may occur in order tracking
  • Google Analytics occasionally misses some transactions

Traffic Attribution:

  • Squarespace: Based on last-click referral
  • Google Analytics: Uses multiple attribution models

Removing Google Analytics

  1. Open Development Tools
  2. Access External API Keys
  3. Delete measurement ID
  4. Save changes

Important Notes:

  • Ajax loading in version 7.0 sites may affect tracking accuracy
  • Location data might vary between platforms due to different IP tracking methods
  • Regular monitoring helps ensure accurate data collection

Related Articles

Previous Articles