Trackthemetric Logo

Trackthemetric + Squarespace

Follow these steps to integrate Trackthemetric analytics into your Squarespace site.

Option 1
Add tracking script using Code Injection

Use Squarespace Code Injection to add the script to the site header.

1. Log in to your Squarespace dashboard.

2. Go to SettingsAdvanced Code Injection.

3. In the Header section, paste the following snippet:

<script
  defer
  id="TrackTheMetric"
  data-website-id="YOUR_WEBSITE_ID"
  data-domain="YOUR_DOMAIN.COM"
  src="https://app.trackthemetric.com/tracker.js"
></script>

Replace the YOUR_WEBSITE_ID and YOUR_DOMAIN.COM with your actual website ID and root domain.

Code Injection is available exclusively on the Squarespace Business plan and above. Although Code Blocks are included with all plans, the execution of JavaScript within Code Blocks requires a Business plan.

4. Click Save.

Option 2
Using a Code Block (per page)

You can also add the script with a Code Block on individual pages.

1. Edit the page where you want to add tracking.

2. Click + to add a new block, then select Code.

3. Paste the snippet and ensure Display Source is unchecked.

<script
  defer
  id="TrackTheMetric"
  data-website-id="YOUR_WEBSITE_ID"
  data-domain="YOUR_DOMAIN.COM"
  src="https://app.trackthemetric.com/tracker.js"
></script>

3
Verify the installation

After implementing:

  • Visit your live Squarespace site.
  • Open your Trackthemetric dashboard.
  • It might take a few minutes for the first pageviews to appear.