<script type="text/javascript">
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
function load() {
console.log(getQueryString("c"));
var dest="http://××.appflood.com/transaction/post_click?offer_id="+getQueryString("a")+"&aff_id ="+getQueryString("b")+"&source="+getQueryString(" c")+"&aff_sub="+getQueryString("d")+"&aff_sub2="+g etQueryString("e")+"&aff_sub3="+getQueryString("f" )+"&aff_sub4="+getQueryString("g")+"&aff_sub5="+ge tQueryString("h");
console.log(dest);
window.location.href=dest;
}
</script>
</head>
<body onload="load()">
<a href="javascript:window.open(load);">123</a>
</body>
</html>
it just build the appflood link that opens in a new tab when clicked. It constructs the link by pulling all the the url parameters found in the current page's querystring I can only assume his tracker/traffic source is passing a bunch of dynamic parameters to the lander.
Hence the function name "getQueryString"
I assume the lander's url you are ripping this form is something like this:
landeryouareripping.com/ ?a=9928&b=affid_123&c=facebook
the script will pull a=9928 b=affid_123 c=facebook ect.
and magically create
http:// ××.appflood.com/transaction/post_click?offer_id=9928&aff_id=affid_123&source=f acebook
Thanks for the reply. But what's the point of doing all this as opposed to just doing a redirect to offer link?
You need to pass some parameters to appflood and you take them from the querystring of the url. Parameters like aff_id, country... This function get them and attach their values to the appflood url.
Thanks very much. So this script is the usual setup for tracking? So no tracker like volumm is needed?
No, it's not the usual approach, but it will send a bunch of tracking data to Appflood.
Theoretically, if you had a solution in place for landing page rotation, you could use this script to run all your tracking on Appflood's system, but then if you want to split-test between networks (which is nearly always a good idea) you'd be kind of screwed.
Hence it's usually better to have a third-party tracker in place.
My suspicion is that anyone running this sort of code has already extensively split-tested offers and networks and is now looking to squeeze maximum speed out of his setup by doing his remaining optimisation through AppFlood's tracking. It's a neat trick, but not one I'd recommend people use initially when running a campaign.
Thanks Caurmen. I'm just little confused on how to setup tracking for fb cpi. I saw this script and post it up for evaluating. Is there any post in here that has fb cpi tracking with