Introduction
If you’re running an online store on Squarespace, tracking purchases is crucial for understanding your customers and optimizing your marketing. In this guide, you’ll learn how to track purchases on Squarespace using Google Analytics 4 (GA4) and Google Tag Manager (GTM). This method ensures accurate and detailed eCommerce tracking using the latest GA4 data model.
This tutorial is ideal for those looking to improve their Squarespace analytics, implement GA4 eCommerce tracking on Squarespace, or set up conversion tracking on Squarespace using Google tools.
Prerequisites
Make sure you have the following ready:
- A Squarespace website.
- A Google Tag Manager (GTM) container.
- A GA4 property created in your Google Analytics account.
- Access to Squarespace’s Code Injection feature.
🚀 Need help?
✅ Hire Me for Setup: WhatsApp Me
✅ Book a Consultation: Schedule a Call
Step 1: Add Google Tag Manager to Squarespace
- Go to your Squarespace Dashboard
- Navigate to: Website > Pages > Custom Code > Code Injection
- Paste your GTM container code inside the Header field
- Click Save
Step 2: Add Purchase Data Layer to the Order Status Page
We’ll push the purchase event into the data layer so GTM can capture it.
- Still under: Dashboard > Website > Pages > Custom Code > Code Injection
- Scroll to the Order Status Page section
- Add the following script:
Step 3: Create a Trigger for Purchase Event in GTM
- Go to GTM → Triggers > New
- Name it:
Purchase
- Trigger Type: Custom Event
- Event Name:
purchase
- Fire on: All Custom Events
Step 4: Create Data Layer Variables in GTM
In GTM, create variables to capture key values from the data layer:
- DLV – transaction_id =
ecommerce.transaction_id
- DLV – value =
ecommerce.value
- DLV – currency =
ecommerce.currency
- DLV – email =
customerEmailAddress
You’ll use these for both the GA4 Purchase Event and Google Ads Enhanced Conversions.
Step 4: Create GA4 Purchase Event Tag
Now, let’s send this data to GA4:
- In GTM, go to Tags > New.
- Name it:
GA4 – Purchase
- Tag Type: GA4 Event Tag
- Configuration Tag: Select your GA4 config.
- Event Name:
purchase
- Parameters:
transaction_id
:{{DLV – transaction_id}}
value
:{{DLV – value}}
currency
:{{DLV – currency}}
- Trigger: Event equals
purchase
Step 5: Test Your Setup
- Use GTM Preview Mode to test the setup.
- Complete a test order in Squarespace.
- Check purchase event in Tag Assistant.
- Visit GA4 > Admin > Debug View to verify the data.
Step 7: Publish the GTM Container
Once verified:
- Click Submit in GTM.
- Add a name like
GA4 Purchase Setup for Squarespace
. - Hit Publish.
🎉 You’ve now implemented GA4 Ecommerce Tracking for Squarespace!
Need help with Squarespace analytics or conversion tracking?
✅ Hire Me for Setup: WhatsApp Me
✅ Book a Consultation: Schedule a Call
✅ Frequently Asked Questions (FAQs)
Q1: How do I add Google Analytics code to Squarespace?
Go to Dashboard > Website > Pages > Custom Code > Code Injection, and paste your GA4 or GTM code in the Header. This activates Squarespace analytics tracking via GA4.
Q2: Can I track purchases on Squarespace using GA4?
Yes! With Google Tag Manager and a custom data layer, you can track purchase events using GA4 Ecommerce tracking on Squarespace.
Q3: Does Squarespace support Enhanced Ecommerce tracking?
Not natively. But you can use GTM and a purchase data layer to enable Squarespace Enhanced Ecommerce Tracking.
Conclusion
Using Google Tag Manager and GA4, you can fully track purchases and enhance conversion tracking in Squarespace. You now know how to:
- Add GTM to Squarespace
- Push a data layer on the Order Status Page
- Send purchase events to GA4
- Use email for Enhanced Conversions
Need Help with Squarespace Conversion Tracking?
Feeling confused or overwhelmed with data layers, JavaScript, or Google Tag Manager? Don’t worry—I’ve got you covered!
I specialize in setting up Google Ads Enhanced Conversion Tracking and GA4 Ecommerce Tracking for Squarespace. I handle everything—from adding GTM to Squarespace to implementing accurate conversion tracking that helps you see more conversions in your reports.
✅ Message me on WhatsApp
✅ Book a Free Consultation
Let’s get your Squarespace analytics working properly today.
For more insightful guides and tips on conversion tracking and digital marketing, check out my other Blogs Here