To enable Google Analytics e-commerce sales tracking with Google Tag Manager (GTM) in Webflow, you need to set up the necessary data layer variables, define the required Tag Manager triggers, and specify the correct completion (confirmation) page URL.
window.dataLayer
such as:In GTM, create a Custom Event Trigger for purchase
.
Define the following Data Layer Variables in GTM:
Variable Name: ecommerce.purchase.transaction_id
Variable Type: Data Layer Variable
Variable Name: ecommerce.purchase.value
Variable Type: Data Layer Variable
Create a GA4 Event Tag:
Tag Type: Google Analytics 4 Event
Event Name: purchase
Event Parameters:
transaction_id
: {{DLV - transaction_id}}
value
: {{DLV - value}}
currency
: {{DLV - currency}}
tax
: {{DLV - tax}}
shipping
: {{DLV - shipping}}
items
: {{DLV - items}}
The completion URL in Webflow for successful purchases typically follows:
/checkout/order-confirmation
This page is where Webflow pushes purchase details into the dataLayer.
purchase
event fires correctly on /checkout/order-confirmation
.To set up Webflow’s e-commerce tracking with Google Tag Manager, ensure Webflow’s purchase event sends data to the window.dataLayer
, configure GTM to read this data, and track purchases via a GA4 event tag triggered on the confirmation page (/checkout/order-confirmation
). Test using Tag Assistant to confirm everything is working properly.