Custom integrations & tracking scripts

How to integrate casino or gaming website

If you have and want to integrate a casino or gaming site, then the requirements on your end are: 1. a thank you page where the successfully registered customer ends up and where the customer's email address (or unique ID your system assigned to him) is available by some variable 2. your system must supports a hook that executes for each player on daily bases. That hook needs to be able to execute an URL (server-2-server call) including the following parameters available by some variable: -...

How to assign visits of a web page to a particular affiliate and campaign?

You can use the following type of click tracking code in the particular webpage: <script type="text/javascript"><!-- document.write(unescape("%3Cscript id='pap_x2s6df8d' src='" + (("https:" == document.location.protocol) ? "https://" : "https://") + "URL_TO_PostAffiliatePro/scripts/trackjs.js' type='text/javascript'%3E%3C/script%3E"));//--> </script> <script type="text/javascript"><!-- PostAffTracker.setAccountId('default1'); try { var AffiliateID='Affiliate ID goes h...

How to display affiliate details at any site

If you want to show the customer/visitor of your shop that he/she was referred by some affiliate, it is possible by using our API. You can e.g. show the whole block of information that can be useful for this customer/visitor. This is useful for signups when you want to show your customer that he was referred by somebody, so the customer will have a parent affiliate... To show a table like this in red: you will need to use this code: <?php include ("pap/api/PapApi.class.php"); $...

How to track video playback events

Each online video player should have a different events related to playback, like video playback started, playback ended, playback paused ... The video players should also allow you to connect a custom JavaScript to each event. This way you can track e.g. video to be watched till its end. Lets works with a real example. YouTube video's got a useful API allowing all what we've described in the first paragraph. You can find the API here: https://developers.google.com/youtube/js_api_reference#Ev...

How to allow customers to enter a referral id (affiliate id) of an affiliate in a page

Some merchants prefer to allow the customers to enter in the merchant's website to enter the Referral Id of the affiliate who referred them to the page to a simple input field in case they did not use any affiliate link to come to the site. This can be achieved by combination of: - simple form with 1 input field - simple php code that will add the affiliate id parameter to the click tracking code once the form is submitted A complete sample code is below: <html> <body&...

Asynchronous tracking scripts

In case you need your scripts to be loaded asynchronously, try to follow this article on how to change it... Default click tracking code The default click tracking code which is available in your merchant panel looks like this: <script type="text/javascript" id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js"></script> <script type="text/javascript"> PostAffTracker.setAccountId('default1'); try { PostAffTracker.track(); } catch (err) { } </s...

How to track impressions in promo emails

If you wanted to track the impressions of promo emails created in Post Affiliate Pro, then into the body (message) of promo email you have to add the following code (make sure you use HTML view): <img src="URL_TO_PAP/scripts/imp.php?a_aid={$refid}&a_bid={$bannerid}" width="0px" height="0px"> Do not forget to replace "URL_TO_PAP" with the real URL address leading to your installation of Post Affiliate Pro (URL has to contain protocol 'https://' or 'https://'). This impression trac...

Tracking the same page (e-commerce site) by multiple PAP/PAN installations - click tracking of multiple PAP/PAN installations on the same page

Occasionally, customer needs to send click/sale tracking request to multiple PAP/PAN installations at once. By default, this was not possible because we are using fixed JavaScript ID for each installation. For the second tracking request there would have to be a different JavaScript ID used and the JS object 'PostAffTracker' refreshed with the new tracking details. It is possible to use a custom suffix now for the trackjs.js file by using a PHP file: 'trackjs.php' with parameter: 'pap_trackin...

Call javascript method when click tracking was executed

Some of our customers need to call javascript functions after the click tracking is finished. Here is example how to connect your own javascript method to our click tracking code. <script id="pap_x2s6df8d" src="........HERE IS YOUR PAP PATH..../scripts/trackjs.php" type="text/javascript"> </script> <script type="text/javascript"> PostAffTracker.executeOnResponseFinished.push(function() { alert("Tracking just finished, execute here your javascript. :-)"); }); papTra...
×