Wix: Difference between revisions

From Growth Agency Wiki
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 11: Line 11:
<li>Click Save.</li>
<li>Click Save.</li>
</ol>
</ol>
=== Sale Tracking ===
The tracking should be set up automatically when the Tag Manager Integration is setup.
</br>The events / variables are:
</br>
<pre>
purchase
ecommerce.purchase.actionField.revenue
ecommerce.purchase.actionField.transactionId
</pre>


== Standard Plan Method ==
== Standard Plan Method ==
Line 29: Line 39:
</ol>
</ol>


== Form Tracking ==
=== Sale Tracking ===
The contact form in Wix will use the event "lead"
If the integration wasn't used then change the variables in GTM to use the below as Custom JS (Experimental):


== Sale Tracking ==
Order ID:
The tracking should be set up automatically when the Tag Manager Integration is setup.
</br>The events / variables are:
</br>
<pre>
<pre>
purchase
ecommerce.purchase.actionField.revenue
ecommerce.purchase.actionField.transactionId
</pre>
If the integration wasn't used then change the variables in GTM to the below:
<pre>
Order ID:
function(){
function(){
  var id = document.querySelector('div[data-hook="OrderLabelDataHook.orderId"]').innerText;
  var id = document.querySelector('div[data-hook="OrderLabelDataHook.orderId"]').innerText;
  return id;  
  return id;  
}
}
</pre>


Order Value:
Order Value:
<pre>
function(){
function(){
  var value = document.querySelector('div[data-hook="OrderPriceDataHook.price"]').innerText.replace(/[£,]/g,"");
  var value = document.querySelector('div[data-hook="OrderPriceDataHook.price"]').innerText.replace(/[£,]/g,"");
  return value;  
  return value;  
}
}
</pre>
= Form Tracking =
The contact form in Wix will use the event "lead"
= Feed =
<pre>
https://support.wix.com/en/article/adding-wix-store-products-to-your-google-merchant-center-catalog
</pre>
</pre>

Latest revision as of 12:56, 1 June 2023

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.

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.

  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

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"

Feed

https://support.wix.com/en/article/adding-wix-store-products-to-your-google-merchant-center-catalog