Wix
Tag Installation
Wix now allows GTM to be installed.
https://support.wix.com/en/article/adding-your-google-tag-manager-account-id-to-your-wix-site
Premium Plan Method
- Go to your site's Marketing Integrations tab.
- Go to Google Tag Manager and click Go For It.
- At the top right click Connect Google Tag Manager.
- Enter your Google Tag Manager container ID.
- Click Save.
Sale Tracking
The tracking should be set up automatically when the Tag Manager Integration is setup.
The events / variables are:
purchase ecommerce.purchase.actionField.revenue ecommerce.purchase.actionField.transactionId
Standard Plan Method
The above requires the client to be on the Wix Premium Plan, if they are on the standard plan then this can be added by the Custom Code section instead.
- Go to Settings > Custom Code
- Click Add Custom Code
- Change the name to GTM - Head
- Paste the GTM script code in here
- Click Apply
- Click Add Custom Code
- Change the name to GTM - Body
- Change the "Place Code in" to "Body - start"
- Paste the GTM no script code in here
- Click Apply
Sale Tracking
If the integration wasn't used then change the variables in GTM to use the below as Custom JS (Experimental):
Order ID:
function(){
var id = document.querySelector('div[data-hook="OrderLabelDataHook.orderId"]').innerText;
return id;
}
Order Value:
function(){
var value = document.querySelector('div[data-hook="OrderPriceDataHook.price"]').innerText.replace(/[£,]/g,"");
return value;
}
Form Tracking
The contact form in Wix will use the event "lead"