How to Install and Configure Google Analytics on Your Squarespace Site: Complete Guide
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
- Navigate to Development Tools panel
- Select External API Keys
- Enter your Google Analytics measurement ID (starts with G-) in the designated field
- Save changes
Note: Allow up to 24 hours for data to appear in Google Analytics.
Setting Up Consent Mode
- Add your measurement ID
- Enable cookie banner in Cookies and Visitor Data panel
- Choose "Opt in & out" banner type
- Customize banner text (optional)
- 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
- Open Development Tools
- Access External API Keys
- Delete measurement ID
- 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