Integrating Affiliate Platform

Hi, I’m trying to integrate the affiliate platform Grow/TradeDoubler to my Wix store. I’ve been provided with the code to use, however, I have to replace certain values in it with ones that Wix uses in order to make it work. Now, I’m not a developer so I’m not 100% sure what I’m doing though I did manage to get it half-working. By that I mean that Grow say my code is working and recognised a test transaction I made but it’s not pulling any of the relevant data, such as order value, order ID, or coupon used. It just says 1 transaction was made at value £0 and order number “orderId”. Can someone please help me edit the code that I’ve been given by Grow so that it can read the data from Wix’s Thank You Page.


<!-- Start TradeDoubler Conversion Tag Insert on confirmation Page -->
<script language="JavaScript">
tdconv('init', '2285628', {'element': 'iframe' });
tdconv('track', 'sale', {'transactionId':'[ORDER_NUMBER]', 'ordervalue':[ORDER_VALUE], 'voucher':'[VOUCHER_CODE]', 'currency':'GBP', 'event':410038});
</script>
<!-- End TradeDoubler tag-->

This is also info that goes with the code:

  • [ORDER_NUMBER] is a unique id that should be generated on your end - you need to replace this placeholder text by an actual tag or variable that will automatically inject the respective value on each conversion. It can be anything that is meaningful to you, and unique for each transaction: an order number, user id, email address, etc. After a conversion has taken place, you can find this id alongside the conversion on our platform. This makes it very easy to cross-reference data on our platform with your own administration.

  • [ORDER_VALUE] is the total value of the conversion. We use this value to calculate any percentage-based commissions you might have set up for your program. Be aware you also need to replace the placeholder text in the code by the actual tag or variable that passes this data on your website, dinamically injecting a new value on each transaction.

  • [VOUCHER_CODE] is the voucher or coupon code that a customer uses during checkout. You need to replace this placeholder text with the actual code, dynamically inserted for each order (if the code is FREEDEL for free delivery then we need to receive FREEDEL instead of this placeholder).

I’ve tried replacing [order_number] with ‘orderId’, [order_value] with ‘total’ and [voucher_code] with ‘couponId’ but that didn’t work. I’ve contacted Grow about it and they said they couldn’t help, I contacted Wix about it and they said that they couldn’t help with “third party code”. Any help will be appreciated.

In my understanding, you cannot simply paste the code to the ‘Custom Code’, because you have to replace the parameters like order totals, who buy it, and who refer the customer.

If you want a no-code solution for Wix Store, at this moment, we found Tapffilate (Google it). They provide a premade code so you don’t need to think anything.

If you want to stay on your platform, please use Wix Fetch and Store Backend Events (so the ‘send’ is triggered)

[ORDER_NUMBER] = Wix Store Order Number #XXXXX
[ORDER_VALUE] = order.totals.total
[VOUCHER_CODE] = order.discount.appliedCoupon.code

Yes, that’s correct and thank you for your recommendation. I will look into Tapffiliate but I’d rather sort this out first if possible. Any chance you could elaborate on how to use fetch and onOrderPaid?

Thanks for your reply. How do I make the code automatically pull the wix order number from the thank you (confirmation) page? And with the other two, do I just replace that text with the one you’ve written? So it’d go:


tdconv('track','sale',{'transactionId':'[ORDER_NUMBER]','ordervalue':order.totals.total,'voucher':'order.discount.appliedCoupon.code','currency':'GBP','event':410038});

Are the "/’ correct in this example?

I have the same problem, they don’t seem to work.