The Most Active and Friendliest
Affiliate Marketing Community Online!

“Adavice”/  “CPA
S

silverfox

Guest
As a affiliate who uses cpa and seo I know that it is hard to get the right people to the cpa offer due to one simple fact cpa offers are most of the time country based.

But because you can never know where people find your website and in what country you can lose much income from that traffic.

I came across a redirect script that can send people based on pre country and ip to the url u have specified (geo-redirect).

Or several country's to one url you have specified (geo-filtering).

This is not my script but sins many people are still looking for it I decided to share the script I use myself.

Hope this helps.

Gr Pascal.
 

Attachments

  • geoip-js-master.zip
    3.9 KB · Views: 68
how to use this script?can you please guide me?

Sure that is no problem.

Guide for geo-ip redirect:

  1. open zip file and extract geoip-target-redirect.html file
  2. open geoip-target-redirect.html file in your code editor (sublime, notepad ++, brackets)
  3. edit lines 31 to 34 (if you use only one country remove lines 33 and 34 but leave line 31 and 32)
redirect%20code_zpsxwqorfof.jpg


If targeting users in US then all visitors that are not from US will go to url stated in target.all on line 31.
And visitors from US will go to url on line 32.

Chance country code:

The only thing u have to chance is the US or GB and specify the url where you want them to go.
Or remove target.Country code that you don't want to use or add as much as you need.

See ISO 3166-1 - Wikipedia for available country codes.

target.US = "url for us with http"; // Redirects US Visitors to this URL.
target.GB = "url for uk with http"; // Redirects UK Visitors to this URL.
target.CA = "url for canada with http"; // Redirects Canadian Visitors to this URL.

When ready save your work and rename the html file to whatever you want.

Upload the file via ftp to your server and copy the link to the html file you have created and uploaded above.

Go to your webpage or landing page that you want to use and past your link in the button you have on the page where people normally click to get to the offer.

Instead of linking to the offer, you link to the html page you have created above that contains the offer link and the code in the html will redirect to the correct offer.

Hope this was useful for you.

Now for the GeoIP Target Filter

This will bulk redirect visitors from many country's to one specific url and visitors that are not from the target country's will go to one other single url.

This is great if you use one offer for multiple country's.
  1. open zip file and extract geoip-target-filter.html file
  2. open geoip-target-filter.html file in code editor just like above.
taget%20filter_zpsfuwtfawv.jpg


Edit line 22 and add, remove or edit the country codes for the country you want to target.
Edit line 23 and change the url for the target country's.
Edit line 24 and change the url for visitors that are not from the target country.

When ready save your work and rename the html file to whatever you want.

Upload the file via ftp to your server and copy the link to the html file you have created and uploaded above.

Go to your webpage or landing page that you want to use and past your link in the button you have on the page where people normally click to get to the offer.

Instead of linking to the offer, you link to the html page you have created above that contains the offer link and the code in the html will redirect to the correct offer.

Use a vpn and test the redirect script to make sure all is setup correctly.

See code on github

For all of you who like to read more about the script or help with debuggin please visit the code on github.

GitHub - OpenAff/geoip-js: GeoIP Target Redirection and Target Filter Redirector using GeoIP API (JS)

Hope it was helpful

Hope this guide was useful for you sins this is my first guide if something is not clear just let me know.

P.S you don't have to use both methods just pick one and use that one.
 
Last edited by a moderator:
Great script.

thanks!

Thank you I am glad you liked it. This a script that every affiliate must have if you know anyone who needs to use this script just point him to this forum post or just share the script with them.
 
banners
Back