Hi David,
Thank you for replying.
We've done "Step 1" where we have set up a global site tag for MS.
Now we have the following:
Step 2
1. Copy the code snippet below and paste it after the code that defines the email address and/or phone number variables on your webpage.
2. Replace the variable names with the real variable names you are defining on your page for these customer attributes. For example, if your variable name is "email_address", then edit the code to reflect that by replacing where it says "emailAddressVariable" with "email_address". You can also call a function that returns the value instead of the variable name.
3. If you only pass one of the two fields (either email address or phone number), you can replace the variable name with an empty string ("") for the other property. For example, replace “phoneNumberVariable” with "" if you don’t want to pass a phone number.
Enhanced conversion snippet
<script>
window.uetq=window.uetq||[];
window.uetq.push('set', { 'pid': {
'em': emailAddressVariable,
'ph': phoneNumberVariable
}});
</script>
Step 3
• - To track event on page load
Copy the snippet below and paste it in between the <head> and </head> tags of the page(s) you’d like to track, right after the base UET tag. Replace the event name and properties as appropriate.
<script>
window.uetq = window.uetq || [];
window.uetq.push("event", "PRODUCT_PURCHASE", {"ecomm_prodid":"REPLACE_WITH_PRODUCT_ID","ecomm_pagetype":"PURCHASE","revenue_value":Replace_with_Variable_Revenue_Function(),"currency":"GBP"});
</script>
• - To track event on inline action:
Copy the snippet below and paste it in between the <head> and </head> tags of the page(s) you’d like to track, right after the base UET tag. Replace the event name and properties as appropriate. Then, call the function "uet_report_conversion" when the specific action is taken i.e. button or URL is clicked.
<script>
function uet_report_conversion() {
window.uetq = window.uetq || [];
window.uetq.push("event", "PRODUCT_PURCHASE", {"ecomm_prodid":"REPLACE_WITH_PRODUCT_ID","ecomm_pagetype":"PURCHASE","revenue_value":Replace_with_Variable_Revenue_Function(),"currency":"GBP"});
}
</script>
Thank you for any help/advice.
David - HOMERADS