Skip to main content
Skip table of contents

How to add Voucher Tracking

Within your Webgains Conversion Script (located in your Order Confirmation page) is a number of elements you can set up in your tracking. Some will have already been configured during your Integration onto the Webgains network.

If you do not already track voucher codes within your Webgains transactions, you can do this via the voucherId: '', variable (line 25).

CODE
<script>
var programid = 'XXXXXX';
var eventid = 'XXXXXXX';
(function(src) {
var o = 'ITCVRQ';
window[o] = window[o] || function() {(window[o].q=window[o].q||[]).push(arguments)};
window[o].l = 1 * new Date();
var s = document.createElement('script');
var f = document.getElementsByTagName('script')[0];
s.async = 1;s.src = src;f.parentNode.insertBefore(s,f);
})('https://analytics.webgains.io/'+programid+'/main.min.js');
ITCVRQ('set', 'trk.programId', programid );
ITCVRQ('set', 'cvr', {
value: '',
currency: '',
language: '',
eventId: eventid,
orderReference: '',
comment: '',
multiple: '',
checksum: '',
items: '',
customerType: '',
customerId:'',
voucherId: '',
location: document.location.href
});
ITCVRQ('conversion');
</script>

Voucher tracking is optional however allows for voucher code reporting, as well as additional voucher tracking features whereby if set-up correctly, and a voucher code added to the platform is set to an Exclusive publisher, only that publisher will be attributed sales for tracked usage of the voucher code.

Although voucher codes can be applied to particular products in the items array, a single voucher code can be applied to the entire transaction by using the 'voucherId' variable.

If a voucher code has been set in voucherId, any items without individual voucher codes assigned will have the voucherId applied to them.

Please ensure that the voucher discount amount is deducted from the Item Value and total Order Value, so that the values match.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.