Jump to content

Why is Google Tag not found on Secure Checkout page?

Recommended Posts

Hello Community Members!

Is there a way to install a Google Tag on Secure Checkout page?

I'm trying to add ecommerce events into Google Analytics 4 using Google Tag Manager but I am stuck. Mainly, I'm trying to track the purchase amount.

I added custom events to the Developer Tools in Squarespace to pass a dataLayer to GA4.

I tried two possible solutions:

(Solution 1) Create an event tag with a (a) Path URL trigger when the user lands on the Order Status page; (b) Click Classes trigger when the user clicks on the purchase button. Neither of these solutions work.

So I tried to (Solution 2) create an event tag with a Custom Event trigger. No avail.

When I debug in Tag Assistant, it looks like the Secure Checkout page doesn't have the Google Tag installed. Is there a way to install the tag on Secure Checkout page?

TY for checking out this post!

image.png

Link to comment
  • Replies 3
  • Views 2.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

1 hour ago, peyo said:

Is there a way to install a Google Tag on Secure Checkout page?

There is a built-in integration with Google Analytics. If you use this option, you don't need to add separate script code. Squarespace sends the following information to Google Analytics for every received order:

  • Order ID
  • Your store name
  • Purchase total (includes shipping)
  • Customer's city, region, and country
  • Product name
  • SKU

Did this help? Please give feedback by clicking an icon below  ⬇️

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Would you like your customers to be able to mark their favourite products in your Squarespace store?

Link to comment
  • 7 months later...

Hi @peyo, did you figure out your tracking issue? I found that I needed to write my own custom code in order to get all of the data I needed in GA4 since Squarespace only sends a limited number of data points in their built-in integration.

With my custom code I'm able to measure how many people view my products, select a item, add to cart, remove from cart, begin checkout, and make a purchase in GA4:

Analytics_Purchasejourney-ga4.thumb.png.a95632a908c6e3908040609fecb75487.png

 

ecommerce-purchase-journey-ga4-exploration-report.thumb.png.78d3d8d061ff61ce02cf64c5f0122b4a.png

 

Since the secure checkout is a third-party website, we're unable to add tracking to that page, but my code covers all other purchase flow pages.

To make it easier for other Squarespace users, I created a GitHub repo for folks to simply copy and paste the code into their own Google Tag Manager containers: https://www.tayloreddata.com/blog/how-to-track-ga4-ecommerce-events-on-your-squarespace-website. Feel free to use the code if you think it would be helpful 🙂

But since this is custom code, please test and ensure it works for your website.

Let me know if you have any questions!

Edited by TayloredData
clarifying that my custom code can't be placed on the secure checkout page because it's a third-party domain.

Data Nerd 🧑🏾‍💻|  I help businesses transform data into actionable insights & sales | Chat with me about your website + marketing analytics challenges: TayloredData.com

Prefer video tutorials? Check out my latest marketing and web analytics how to videos

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.