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://" : "http://") +"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 here';var B...

How to display affiliate details at any site

If you want to show your 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 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 table like this in red: you will need to use this code: <?php include ("pap/api/PapApi.class.php"); $sessi...

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#Events...

Mobile app tracking

Let's imagine, that you are a developer of Android or Apple iOS applications and you would like to know the top referring source of purchases of your application or of in-apps of your application. This article is meant to be read by actual mobile app developers! Don't expect to understand all the steps if you are not a mobile app developer. Maybe you would say that Google Play and Apple Store allows you to do so, but unfortunately that is not the case. This article is going to shed some light ...

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><!-- This ...

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"><!--document.write(unescape("%3Cscript id='pap_x2s6df8d' src='" + (("https:" == document.location.protocol) ? "https://" : "http://") + "URL_TO_PostAffiliatePro/scripts/trackjs.js' type='text/javascript'%3E%3C/script%3E"));//--> ...

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 'http://' or 'https://'). This impression tracking code ...

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_tracki...

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. :-)"); }); papTrack(); </s...