peyo Posted May 17, 2023 Share Posted May 17, 2023 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! Link to comment
paul2009 Posted May 17, 2023 Share Posted May 17, 2023 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
peyo Posted May 17, 2023 Author Share Posted May 17, 2023 Thanks for your response, @paul2009. I had the wrong measurement ID in the External API Keys. Hopefully, it'll start tracking correctly now. Link to comment
TayloredData Posted December 28, 2023 Share Posted December 28, 2023 (edited) 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: 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 January 6 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment