How to Enable Ecommerce Data Layer in Squarespace Store with GTM

Introduction

Tracking ecommerce events like purchases is essential for understanding user behavior, optimizing ads, and improving your Squarespace store’s performance. Unfortunately, Squarespace does not natively support GA4 Ecommerce tracking via Data Layer.

This guide shows you how to implement a custom ecommerce data layer in Squarespace using Google Tag Manager (GTM)—100% free and without any third-party plugin.

Prerequisites 

Make sure the following are in place before you begin:

  • A live Squarespace Commerce website
  • Google Tag Manager container installed site-wide
  • GA4 property already set up
  • Access to Order Status Page HTML
  • Basic GTM & JS understanding (helpful but not required)

🚀 Need help?

✅ Hire Me for SetupWhatsApp Me
✅ Book a ConsultationSchedule a Call

Step-by-Step Setup

Step 1: Add Google Tag Manager to Squarespace

  • Go to Squarespace Dashboard → Website → Settings → Advanced → Code Injection
  • Paste your GTM tracking script inside the <head> field
  • Click Save

GTM script header

Step 2: Add item data Layer to the Squarespace footer

  • Go to Squarespace Dashboard → Website → Settings → Advanced → Code Injection
  • Insert the item data layer script inside the <footer> field
  • Click Save

Item Data Layer

Step 3: Add Purchase Data Layer to the Order Confirmation Page

  • Navigate to: Squarespace Dashboard → Settings → Checkout → Order Confirmation Page
  • Insert this script:

Item Data Layer

Frequently Asked Questions (FAQs)

  1. Q. Can I track multiple items?
    Yes. The ecommerce.items array handles multiple items.
  2. Q. Is this method free?
    Yes, fully free using Squarespace + GTM.
  3. Q. Can I track add-to-cart or checkout steps?
    Yes, We can track all the ecommerce events
  4. Q. Does this work with Universal Analytics (UA)?
    No. UA is deprecated. This is for GA4 only.

Conclusion

By completing this guide, you’ve enabled a fully functional ecommerce data layer in Squarespace. You can now reliably fire GA4 purchase events—essential for conversion tracking, ad optimization, and informed marketing decisions.

📞 Book a Free Ecommerce Tracking Audit or Setup Call

Not sure if everything is firing correctly?
Need expert help setting up your ecommerce data layer in Squarespace?

✅ Let’s make sure your GA4 purchase tracking is working 100%
💡 Get personalized guidance tailored to your store

✅ Hire Me for SetupWhatsApp Me
✅ Book a ConsultationSchedule a Call

Author

Md Zubayer Islam
Marketing Data Analyst

LinkedIn
Facebook
Twitter

Leave a Comment

Your email address will not be published. Required fields are marked *