I'm attempting to implement AWIN tracking to my wordpress site. I need to return the subscription ID, and the voucher code used for a transaction.
See Below:
<script>
dataLayer = [{
'transactionID': "{transactionID}",
'transactionPromoCode': "{transactionPromoCode}",
'event': "awin.dl.ready"
}];
</script>
I need to replace "{transactionID}" with the unique string that comes with each sale. I do not know how to do this
I tried firstly doing this:
<script>
dataLayer = [{
'transactionTotal': "7.99",
'transactionCurrency': "GBP",
'transactionID' = subscr_id ,
'transactionPromoCode' = voucher ,
'event': "awin.dl.ready"
}];
</script>`
` I used subscr_id and voucher as they are whats listed in the memberpress documentation. This however did not work.see image attached As you can see, each Memberpress transaction has a unique reference number see image attached
What I need to do is return the unique ID for the order, into this code provided by the affiliate marketplace
<script>
dataLayer = [{
'transactionID': "{INSERT CODE HERE}",
'transactionPromoCode': "{transactionPromoCode}",
'event': "awin.dl.ready"
}];
</script>
Can anyone help me out?