The Pre-landing page is like a transit page which help users to land on particular landing pages as per their requirements. It acts as a link between the traffic sources and the offer's landing page. Pre-landing pages for push and native ads are very useful in increasing conversions.
Setup (Pre-landing Page )
1. Offers » Offer-Approved
2.Select Offer » General
3. Select "Pre-landing" from "Type" dropdown and add the "Pre-landing URL" under "Landing Page" Field.
Token to append in URL
landing_page={pre_landing}
4. Submit to save changes
Affiliate Tracking URL (Pre landing Page)
Login to Affiliate Dashboard
Offers » My Offers (approved) » Select Offer
Select the Pre-landing Page from the drop-down
4. Get AffiliateTracking URL
Create webpage (Pre landing page)
Create a webpage using below script having same URL used in Setup
<script>function base64_decode(r){if("function"==typeof this.window.atob)return atob(r);var n,t,e,i,o,f,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=0,h=0,c=[];if(!r)return r;r+="";do{n=(f=a.indexOf(r.charAt(d++))<<18|a.indexOf(r.charAt(d++))<<12|(i=a.indexOf(r.charAt(d++)))<<6|(o=a.indexOf(r.charAt(d++))))>>16&255,t=f>>8&255,e=255&f,c[h++]=64==i?String.fromCharCode(n):64==o?String.fromCharCode(n,t):String.fromCharCode(n,t,e)}while(d<r.length);return c.join("")}
function getUrlVars(){ var vars = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value; }); return vars; }
function getUrlParam(parameter){ var urlparameter = ''; if(window.location.href.indexOf(parameter) > -1){ urlparameter = getUrlVars()[parameter]; } return base64_decode(urlparameter); }
var landing_page = getUrlParam('landing_page');var aurl = document.getElementsByTagName('a'), ahf = aurl.length;while(ahf--){ aurl[ahf].setAttribute('href', landing_page); aurl[ahf].setAttribute('target','_blank');}</script>
Testing Pre landing Page
Use the below code snippet to test the Pre landing script
<!DOCTYPEhtml><html><head><title>Page Title</title></head><body> <ahref=""> Test Link 1</a> <ahref=""> Test Link 2</a> <ahref=""> Test Link 3</a></p><script> function base64_decode(r){if("function"==typeof this.window.atob)return atob(r);var n,t,e,i,o,f,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=0,h=0,c=[];if(!r)return r;r+="";do{n=(f=a.indexOf(r.charAt(d++))<<18|a.indexOf(r.charAt(d++))<<12|(i=a.indexOf(r.charAt(d++)))<<6|(o=a.indexOf(r.charAt(d++))))>>16&255,t=f>>8&255,e=255&f,c[h++]=64==i?String.fromCharCode(n):64==o?String.fromCharCode(n,t):String.fromCharCode(n,t,e)}while(d<r.length);return c.join("")}
function getUrlVars(){ var vars = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value; }); return vars; }
function getUrlParam(parameter){ var urlparameter = ''; if(window.location.href.indexOf(parameter) > -1){ urlparameter = getUrlVars()[parameter]; } return base64_decode(urlparameter); }
var landing_page =getUrlParam('landing_page');var aurl =document.getElementsByTagName('a'), ahf =aurl.length;while(ahf--){ aurl[ahf].setAttribute('href', landing_page); aurl[ahf].setAttribute('target','_blank');} </script></body></html>