Tracking conversions for offers with forms

If the offer you promote requires filling out a form on the offer page, you’ll need to emulate a click to be able to track conversions in Zeustrack. This is needed because sending the form doesn't perform the click itself which is absolutely needed to send the visit ID to the affiliate network and fire a postback to Zeustrack.


Here is what you need to do to emulate the click:

  1. Paste this script on the offer page
    <script>
        var linkClicked = false;
        var beacon=function(opts){opts=opts||{};opts.url=opts.url||null;opts.vars=opts.vars||{};opts.error=opts.error||function(){};opts.success=opts.success||function(){};var varsArray=[];for(var key in opts.vars){varsArray.push(key+'='+encodeURIComponent(opts.vars[key]))}var qString=varsArray.join('&');if(opts.url){var beacon=new Image();if(beacon.onerror){beacon.onerror=opts.error}if(beacon.onload){beacon.onload=opts.success}beacon.src=opts.url+(qString?'?':'')+qString}};
        function emulateClick(){if(!linkClicked){beacon({url:'http://{trackingdomain}/click/?origin={origin}'});linkClicked=true}};
    </script>
  2. When sending the form data, you’ll need to call the emulateClick() function. For example, if you are sending the data from the form by pressing the Send button, your code might look like this:
    <button class="submit-form" type="submit" onclick="emulateClick()">Send</button>