Home > Paid Traffic Sources > Facebook & Instagram

How to pass the kw= variable from your geo redirect link to your prosper202 link? (7)


02-06-2013 04:20 AM #1 akrtw1 (Member)
How to pass the kw= variable from your geo redirect link to your prosper202 link?

Hi guys,

So I have created a php file as taught by Tom and Aziz from ipyxel.com:

http://ipyxel.com/redirect-internati...geo-targeting/

In the script, I redirect people from the UK to my prosper tracking link, which directly links to my offer. And people from other countries to an international page of the offer. So the FB reviewers would see that page.

But how do I add keyword for that redirect url and pass it to my prosper tracking link?

I do that because I want to track each ad individually. So my keyword will look sth like this:

h1_img1, h2_img2...

Thank you in advance!


02-06-2013 07:51 AM #2 zeno (Administrator)

1) Add your keywords to the end of your advert URL. If your advert linked to A below, change to something like B. For passing multiple things do something like in example C

Code:
A) http://yourdomian.com/track.php
B) http://yourdomain.com/track.php?key1=h1_img1
C) http://yourdomain.com/track.php?key1=h1_img1&key2=US&key3=M25-30
2) The PHP file can now pull those strings of text out of the URL and we can use them. You do this using $_GET. To get the value after key= we use $_GET['key1'], which pulls out "h1_img1". So, all we need to do is add this to our PHP script and use it to pass the value into our tracking 202 link. Easy right?

3) I tend to set a variable to equal the value we GET out. Like so:
[PHP]$subid1 = $_GET['key1'];[/PHP]
I do this simply because I like to and it makes the redirect link at the bottom look cleaner. Now wherever we put $subid1 in the PHP file it inserts that h1_img1 value.

4) At the redirect part, change your T202 link to add that passed value, e.g.
[PHP]'http://something.com/tracking202/redirect/dl.php?t202id=1234&t202kw='.$subid1;[/PHP]

Since there are so many ways prosper202 campaigns could be setup (e.g. DL vs lander, PHP/JS tracking etc) you'll have to figure out where to put that passed value. If it's direct linking you'll probably be putting it after t202kw=.

Here is an example redirect script:
[PHP]
<?php

//First we need to get the parameters passed with the URL after the ?. We do this using $_GET['name'] - here 'name' is whatever we had in the URL, i.e. subid1, subid2, etc. Then we are going to set them to be equal to a variable - here I just use the same thing, $subid1, $subid2, etc. Variables start with $

$subid1 = $_GET['key1']; //Subid 1
$subid2 = $_GET['subid2']; //Subid 2
$subid3 = $_GET['subid3']; //Subid 3

$geoip = geoip_record_by_name( $_SERVER['REMOTE_ADDR'] );
$country_code = $geoip['country_code'];

switch($country_code) {
case 'US':
header('Location: http://something.com/tracking202/redirect/dl.php?t202id=1234&t202kw='.$subid1);
exit;

default: //exceptions
header('Location: http://offerurl.com'); //the offer page, no redirects or affiliate links here unless you want to track people outside your designated countries.
exit;
}
?>
[/PHP]

Passing subids is bread and butter stuff, get used to using PHP to pass querystrings/subids and do what needs to be done with them.


02-06-2013 07:55 AM #3 akrtw1 (Member)

Thanks so much Zeno!


02-06-2013 08:19 AM #4 andyscraven (Member)

@zeno is The Man!!!!

This is exactly what I do also. Often I will append the Country code to the value passed so: ...&t202kw=US-'.$subid1;

So I can gauge where the traffic is coming from.

the other thing I do is keep a log file when traffic hits the script from Countries that my offer is not valid for. After I log it I send them somewhere else so they don't see one of those horrible survey co-reg landers!


02-06-2013 08:56 AM #5 andyscraven (Member)

Hey Zeno

Is it possible to pass out variables such as Age from Facebook other than targeting specific ages in the Ad? Like you do with the Dynamic Tags in POF?


02-06-2013 09:01 AM #6 thomasbhm (Member)

Quote Originally Posted by andyscraven View Post
Hey Zeno

Is it possible to pass out variables such as Age from Facebook other than targeting specific ages in the Ad? Like you do with the Dynamic Tags in POF?
No, facebook does not support dynamic insertion.


02-06-2013 11:39 AM #7 caurmen (Administrator)

Great summary, Zeno!


Home > Paid Traffic Sources > Facebook & Instagram