Below are instructions for Javascript tracking:

1. Add this script to your Homepage Footer and any other entry page (such as different landing pages or product pages)

script>
    (function () {
        var clickRe = /(?:\d+FOF\d+)/i;
        var match = clickRe.exec(window.location.href);
        if (match && match.length > 0) window.localStorage.setItem('sid', match[0]);
    })();
</script>

2. Fill in the correct codes in the AMT and UID parameters into the confirmation page script provided by your account manager (if you don’t have one, please contact us)

UID = code to pass back unique order numbers
AMT = code to pass back sale amounts (this can be left blank for Advertisers with flat rate payouts)

3. Once the UID and AMT codes are implemented, add the second script to your Order Confirmation Page. Example confirmation page script: (DO NOT USE)

<script>
    (function () {
        var sid = window.localStorage.getItem('sid');
        var req = new XMLHttpRequest();
        req.open('GET', 'https://track.flexlinks.com/conversiontracking.ashx?AID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&AMT={INSERT SALE AMOUNT CODE}&UID={INSERT ORDER ID CODE}&SID=' + sid);
        req.send();
    })();
</script>

4. After everything is implemented, we need two tests (with different sale amounts) to ensure all processes are working properly.

  • A test link will be emailed to you by a FlexOffers account manager
  • Click on the test link and go through two tests
    • For flat rate payouts, we must see order ids reported back to our system
    • For percentage (RevShare) payouts, we must see order ids and two different sale amounts reported back to our system

    If you have any questions, do not hesitate to reach out to your account manager.