1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Changing links depending of the user location

Discussion in 'General Scripting Chat' started by Scipio00, Sep 20, 2014.

  1. Scipio00

    Scipio00 Regular Member

    Joined:
    Dec 4, 2010
    Messages:
    443
    Likes Received:
    69
    I have an affiliate website in latin america and I wondered if I can change the affiliate links depending on the location of the User.

    In the US this problem doesn't happen very often: You recommend a mobile phone and give an amazon affiliate link. Now the user gets redirected to amazon.com or amazon.co.uk or amazon.com.au depending on his location.

    Unfortunately the market in latin america is way more fragmented. So if you recommend a mobile phone, you need an mexican aff link, an argentinian, a spanish one, a colombian one,...

    If now the website checks the user location and changes the link accordingly we could solve this problem. Is that possible? If so, is a script for that existing? If not, how much is it to code something like that?
     
  2. Javado

    Javado Junior Member

    Joined:
    Jun 26, 2012
    Messages:
    186
    Likes Received:
    78
    Occupation:
    Youtubes
    Location:
    Youtubes
    I think that you need smarturl.it
     
    • Thanks Thanks x 1
  3. LATLR

    LATLR Newbie

    Joined:
    Jul 19, 2014
    Messages:
    9
    Likes Received:
    1
    Location:
    Montreal
    If you're using Wordpress, you could use the plugin "Visitor Country" to change your link depending on the location of you visitor. Here's a quick example I've made to show you what you could do with a simple shortcode :

    pastebin /sB7Z9Qtd

    (Errors occurred while I tried to submit it, got to put it in pastebin..)

    After that, in your Wordpress post/page you just have to add something like :

    [showMobilePhoneLink anchor="Click here to buy a mobile phone"]

    And it will generate a good link depending of the visitor country with the anchor you specified. That way, you can use it on as many pages as you want and always get the good link & a custom anchor.

    If you're not using Wordpress, you should try to find a script that use the MaxMind GEO Ip database.. It shouldn't be hard to find!

    Good luck :)
     
    • Thanks Thanks x 1
  4. dbands

    dbands Newbie

    Joined:
    Nov 1, 2014
    Messages:
    17
    Likes Received:
    19
    On my side I am using a very old piece of software it is called click maximiser. It works for what I use it for. It redirects per country etc.