Home > Paid Traffic Sources > Facebook & Instagram

can some help me see what's the function of this script (7)


03-20-2015 02:41 AM #1 sleenirvana (Member)
can some help me see what's the function of this script



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


03-20-2015 03:02 AM #2 willjr (Member)

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


03-20-2015 03:31 AM #3 sleenirvana (Member)

Thanks for the reply. But what's the point of doing all this as opposed to just doing a redirect to offer link?


03-20-2015 12:07 PM #4 jjbachiller (AMC Alumnus)

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.


03-20-2015 12:14 PM #5 sleenirvana (Member)

Thanks very much. So this script is the usual setup for tracking? So no tracker like volumm is needed?


03-20-2015 12:24 PM #6 caurmen (Administrator)

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.


03-20-2015 12:33 PM #7 sleenirvana (Member)

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 Voluum?


Home > Paid Traffic Sources > Facebook & Instagram