The Most Active and Friendliest
Affiliate Marketing Community Online!

“Adavice”/  “CPA

Anyone knows a Tool for GEO redirect?

sofianz

New Member
affiliate
Hallo all
do someone knows a tracking or a redirect tool to send visitors to different Landing pages depending on the Geolocation (City, region or Google Map Data)
I want to send people to a certain Lead Gen LP and if someone is from certain city, he should get directly to the right LP with the Offer next to him. Any idea?
Thank you and best
 
Learn to program :p
GeoIP Products « MaxMind Developer Site <<< this is one database
Your webserver can do this. This can be done in PHP (other interpreter programming languages).
you have to envelope (get) the client IP address, which is really their ISP server's location BTW, look up that IP to its database location, then do a 302 redirect to the correct URI on the server >>> the localized landing page in your case.

As far as *tools* go maybe some affiliate network has this programed in your niche already?
 
@Graybeard thank you, sounds complicated, and getting this programmed sounds like a lot of hassle. checked some Tracking Tools with rules but only based on City etc...I think i am gonna create this manually first in FB with Excel and see how this will perform. Thanks again!
 
Tracking is one of the options for the redirect, but you might want to use a platform called unless.com which displays content according to all sorts of attributes, including GEO.
 
That's fine if you can tolerate the runtime delay using a remote server. If the delay in the redirect is > 250ms (1/4 of a second) you will start suffering a traffic loss. At 1 second a 20% loss -- longer worse ...

It can take me 700 ms to get some google fonts from their CDN same with Bootstrap and jQuery but the file size matters too. And those are huge bandwidth CDN servers.
 
Log in to your FTP client and locate the folder where you want to place your redirect script. Make a new file with .php extension, let's name it redirect.php

Place the following code inside:
Code:
<?php
$a = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$_SERVER['REMOTE_ADDR']));
$countrycode= $a['geoplugin_countryCode'];

if ($countrycode=='US')
    header( 'Location: https://www.cpagrip.com/show.php?l=0&u=97145&id=9378&tracking_id=' ) ;
else if ($countrycode=='GB')
    header( 'Location: https://www.cpagrip.com/show.php?l=0&u=97145&id=9643&tracking_id=' ) ;
else if ($countrycode=='CA')
    header( 'Location: https://www.cpagrip.com/show.php?l=0&u=97145&id=5882&tracking_id=' ) ;
else if ($countrycode=='FR')
    header( 'Location: https://www.cpagrip.com/show.php?l=0&u=97145&id=9970&tracking_id=' ) ;
else if ($countrycode=='AU')
    header( 'Location: https://www.cpagrip.com/show.php?l=0&u=97145&id=5872&tracking_id=' ) ;
else if ($countrycode=='IE')
    header( 'Location: https://www.cpagrip.com/show.php?l=0&u=97145&id=10791&tracking_id=' ) ;
else if ($contrycode=='TR')
    header( 'Location: https://www.cpagrip.com/show.php?l=0&u=97145&id=9654&tracking_id=' ) ;
else if ($countrycode=='IN')
    header( 'Location: https://www.cpagrip.com/show.php?l=0&u=97145&id=10815&tracking_id=' ) ;
else
    header( 'Location: http://google.com' ) ;
?>
 
Hallo all
do someone knows a tracking or a redirect tool to send visitors to different Landing pages depending on the Geolocation (City, region or Google Map Data)
I want to send people to a certain Lead Gen LP and if someone is from certain city, he should get directly to the right LP with the Offer next to him. Any idea?
Thank you and best

I did something similar but was based on the country, said that the logic would be the same. Get a database from ip2location or similar down to city level. Then you need to create a php script that
- gets the user ip
- send the ip to the database and gets back the city location
- if you have a special offer for that city send to specific offer if not send to general offer

If your website is wordpress, then the php script will be in the functions.php file of the theme.

Hope it helps.
 
The best way is to use your webserver to redirect

curl -w "@time.txt" -o /dev/null -s "http://www.geoplugin.net/php.gp?ip=92.127.90.2"

barry@paragon-DS-7:~/system/curl$ curl -w "@time.txt" -o /dev/null -s "http://www.geoplugin.net/php.gp?ip=92.127.90.2"
time_namelookup: 0.125
time_connect: 0.258
time_appconnect: 0.000
time_pretransfer: 0.258
time_redirect: 0.000
time_starttransfer: 0.398
----------
time_total: 0.398 ms


Right way
Install geoip on your webserver you will have the maxmind GeoIP database locally then use the PHP function
<?php
$userip = getenv(GEOIP_COUNTRY_CODE);

time is like 0.010

Stop using *tools* to do server functions. I can load a whole simple landing page in 0.780 ms in some cases avoiding remote scripts and requests. TIME is the enemy of CONVERSION!


BTW the closing ?> is no longer necessary with PHP 7.x PHP 5.6 support stops this year -- update your servers if you have not yet -- PHP 5.6 will receive no security updates in 2019
 
MI
Back