Squarespace: How to Add and Configure Google Analytics Tracking
Connect your Squarespace site to Google Analytics to track visitor behavior and analyze traffic data. Here's how to set it up correctly:
Prerequisites
- Active Google Analytics account (sign up at analytics.google.com)
- Google Analytics measurement ID (starts with G-)
Adding Google Analytics
- Navigate to Developer Tools
- Click External API Keys
- Enter your measurement ID in Google Analytics Account Number field
- Save changes
Note: Allow up to 24 hours for data to appear in your Analytics dashboard.
Setting Up Consent Management
- Add your Google Analytics measurement ID
- Enable Cookie Banner in Cookies and Visitor Data panel
- Choose "Opt-In and Opt-Out" banner type
- Customize banner text (optional)
- Save settings
Tracking Accuracy Tips
- Filter out your own IP address to prevent skewing data
- Use Google Analytics filters to exclude internal traffic
- Preview pages in incognito mode to avoid registering test views
E-commerce Tracking Squarespace automatically sends these transaction details:
- Order ID
- Store name
- Total purchase amount (including shipping)
- Customer location (city, region, country)
- Product details
Best Practices
- Regularly check your tracking setup
- Monitor consent management compliance
- Review data accuracy in Google Analytics
- Set up conversion goals for important actions
Remember to consult Google's documentation for specific Analytics features and troubleshooting support.