Analytics - Ecommerce SEO - Tag Manager
How To: Implement Revenue Tracking On Square Space
One of the tasks that keeps me busiest these days as a GA4 Consultant is ensuring accurate user and revenue tracking is in place, not just for GA4 but for other 3rd party tracking scripts as well. Now as much as I like a challenge, Square Space really does throw up one that shouldn’t even be a challenge in the first place.
The Issue
Out of the box, Square Space GA4 tracking offers standard user tracking and the most basic of ecommerce tracking by tracking purchases and which items were bough, but doesn’t track the associated revenue – which leads to a mostly useless report such as:
The only question I have is, Why Not?
Why even bother tracking any ecommerce at all if you not going to do the fundamentals.
The good news is, it can be fixed, but you have to do it yourself.
The Solution
I spent a lot of time looking for answers, but few were forthcoming. I found an article from 2023 suggesting there was a hidden JS object you could interrogate as follows:
Y.Squarespace.CommerceAnalytics._yuievt.events["commerceTrack:commerce-checkout-confirmed"].details[0]
But it didn’t work.
And then I stumbled across this gem of an article by Taylor Martin who has put some bespoke code together. The full article is here:
The Complete GA4 Ecommerce Setup Guide for Squarespace Using Google Tag Manager
I won’t go into too much detail here as Taylor’s article covers it all but in summary, there is custom HTML and recommend triggers you can implement via Google Tag manager which will help you track:
- View Item List
- View Item
- Select Item
- Add to Cart
- Remove from Cart
- View Cart
- Begin Checkout
- Purchase
There are a couple of things to note – these are in some cases based on specific Square Space elements and naming conventions being visible on the page. Therefore this may not work if you directly copy the code, and you may need to tweak to match the layout and css of your specific square space theme – but, do that, and you’re good.
And on my site, we now have items viewed and revenue tracking in place. Add to cart doesn’t due to how the site functions but ultimately it’s the revenue we wanted:
So there you go – I love blog posts that folk do like this, they can be absolute game changers for you or your client’s marketing efforts. If you need any assistance implementing this, feel free to get in touch.
categories
- Analytics Insights
- Crawl Rate Insights
- Ecommerce SEO Insights
- International SEO Insights
- Keyword Research Insights
- Local SEO Insights
- Migrations Insights
- News Insights
- On Page SEO Insights
- Performance Analysis Insights
- SEO Audits Insights
- Site Speed Insights
- Structured Data Insights
- Tag Manager Insights
- Uncategorised Insights
- Wordpress SEO Insights
latest posts
Google Update: Why You Are Seeing a Drop In Impressions & Increase In Average Position
How To: Use GSC & RegEx To Find Out The Questions Your Users Are Asking
Full List Of All Google My Business (GMB) Profile Categories
Why I've Rebranded as Dave Ashworth
A Rough Guide To: Server-Side Tracking
get in touch
If you need some expert website optimisation and configuration, want to find out more, or even just have a question, fill in the form below as I will always be happy to help