Wix

From Growth Agency Wiki
Revision as of 16:28, 4 January 2022 by Aaron.trevellick (talk | contribs)
Jump to navigation Jump to search

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

  1. Go to your site's Marketing Integrations tab.
  2. Go to Google Tag Manager and click Go For It.
  3. At the top right click Connect Google Tag Manager.
  4. Enter your Google Tag Manager container ID.
  5. Click Save.

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.

  1. Go to Settings > Custom Code
  2. Click Add Custom Code
  3. Change the name to GTM - Head
  4. Paste the GTM script code in here
  5. Click Apply
  6. Click Add Custom Code
  7. Change the name to GTM - Body
  8. Change the "Place Code in" to "Body - start"
  9. Paste the GTM no script code in here
  10. Click Apply

Form Tracking

The contact form in Wix will use the event "lead"

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

If the integration wasn't used then change the variables in GTM to the below:

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; 
}