Use our built-in integration to connect your site to Google Analytics for visitor tracking and other reporting. To start, you'll need a Google Analytics account. You can sign up here.
Note: This is a built-in integration with Google Analytics. If you use this option, you don't need to add separate script code.
Add your Google Analytics tracking ID
In the Home Menu, click Settings, click Advanced, and then click External Services.
Google Analytics provides a tracking ID for each website you choose to track. If you aren't sure how to find your account number, visit Google's documentation.
In the Google Analytics Account Number box, enter your tracking ID, and then click Save. It may take up to 24 hours for site statistics to populate in Google Analytics.
Hide your activity
Every time you preview a page when you're logged in, Google Analytics registers it as a page view. If you don't want data from your visits mixed in with data from visitors, you can create a filter in Google Analytics to exclude your IP address. To learn how, visit Google's documentation on excluding internal traffic. For help finding your IP address, see About IP addresses.
This is a change from how Google Analytics interacted with Squarespace 6.
If you're using Google Analytics to track conversions for your eCommerce store, Squarespace sends the following information to Google Analytics for every received order:
- Order ID
- Your store name
- Purchase total (includes shipping)
- Customer address
- Product name
Differences between Squarespace and Google Analytics
There are always variations between any two analytics platforms based on how each platform is built to calculate results.
Counting internal traffic when logged in
Squarespace doesn’t count internal traffic once you’re logged in. Google Analytics does, but you can set up a filter to exclude certain IP addresses.
Filtering bots and non-human activity
Squarespace and Google Analytics have different measures for filtering non-human traffic like crawlers and bots.
Rounding numbers based on sample data
In Squarespace, numbers are always calculated from your full visitor activity, no matter your audience size. In Google Analytics, some numbers may be estimates based on a sample of visitors. Learn more in Google’s documentation.
Counting visits spanning two days
Our platforms take different approaches to late-night browsing sessions that span the midnight boundary, where a visitor starts on your site before midnight and ends the next day.
In Squarespace, a single visitor session that straddles the midnight boundary counts as one visit. In Google Analytics, a single visitor session that straddles the midnight boundary is split into two visits.
Tracking Commerce conversion
Some Squarespace users who track sales in both platforms have reported that Google Analytics occasionally misses some orders.
Attributing traffic to a source
In Traffic Sources, we identify a referrer based on a visitor’s last click. Google has a similar tracking method with some exceptions. As a result of these differences, Direct traffic numbers in Squarespace Analytics might be greater than what you’ll see in Google Analytics.
Google is currently rolling out an update to Google Analytics called Universal Analytics. We don't offer Universal Analytics with our official Google Analytics integration. However, you can add Universal Analytics to your Squarespace site by adding some tracking code to Code Injection.
- In the Home Menu, click Settings, click Advanced, and then click External Services.
- Ensure that Google Analytics Account Number is blank. If there's a number in the box, delete it.
- Click Save.
- In Google Analytics, locate your tracking code for Universal Analytics. For help finding this code, visit Google's documentation.
- Paste your tracking code into Header Code Injection.
Note: Universal Analytics currently falls out of the scope of our integration with Google Analytics. Until Google retires Classic Analytics codes, tracking code for Universal Analytics must be added in Code Injection, and we can’t offer more help on any custom code modifications. To learn more about Universal Analytics, visit Google's documentation. Stay tuned to this guide for updates on this integration.