snake Posted March 2, 2023 Share Posted March 2, 2023 I have signed up with AWIN.com and need to add their tracking code in WHMCS. Can anyone tell me how/where to add this? I want to do it in such a way that it won't get broken/overwritten every time I update whmcs. here are the instructions. Order Confirmation Page Add the tracking code snippet to your order confirmation page. This enables us to send accurate transaction data and correctly attribute sales and commission to your partners. Replace the placeholders in {{ brackets }} with the variables your site uses for that specific information. To find out more about each placeholder, please click on the examples below the code. <!-- Fall-back Conversion Pixel - Mandatory --> <img src="https://www.awin1.com/sread.img?tt=ns&tv=2&merchant=45669&amount={{order_subtotal}}&cr={{currency_code}}&ref={{order_ref}}&parts=DEFAULT:{{sale_amount}}&vc={{voucher_code}}&ch=aw" border="0" width="0" height="0"> <!-- Conversion Tag - Mandatory --> <script type="text/javascript"> //<![CDATA[ /*** Do not change ***/ var AWIN = {}; AWIN.Tracking = {}; AWIN.Tracking.Sale = {}; /*** Set your transaction parameters ***/ AWIN.Tracking.Sale.amount = "{{order_subtotal}}"; AWIN.Tracking.Sale.orderRef = "{{order_ref}}"; AWIN.Tracking.Sale.parts = "DEFAULT:{{sale_amount}}"; AWIN.Tracking.Sale.voucher = "{{voucher_code}}"; AWIN.Tracking.Sale.currency = "{{currency_code}}"; AWIN.Tracking.Sale.channel = "aw"; //]]> </script> 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst WHMCS Anwar Posted March 30 WHMCS Technical Analyst Share Posted March 30 Hi there, You should be able to do this, via a custom hook. The hook point to use would be the ShoppingCartCheckoutCompletePage that executes when the Complete Page is displayed on checkout. We also have an example of how this can be implemented, in another thread (In particular, see “2. Place your tracking code script in a Hook.”): Place your tracking code script in a custom hook, should prevent it from being overwritten whenever you update your WHMCS. For further information, visit: https://developers.whmcs.com/hooks/getting-started/ https://developers.whmcs.com/hooks/hook-index/ 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.