Switching Ads using a javascript for Geotargeting?

Discussion in 'AdSense' started by ethanwa, Nov 27, 2006.

  1. #1
    Ok, I have both Adsense and Yahoo. For USA clicks, I'd like to use Yahoo (they bring me way more money). For international, I'd like to use Adsense (Yahoo doesn't allow non-USA clicks). I want some way to detect the users IP address and then switch the Ads on my site dynamically based on their location... so either Yahoo (USA) or Adsense (International).

    Does anyone have any ideas or examples on how to do this? I am sure it has been done before.

    Thanks,

    Ethan
     
    ethanwa, Nov 27, 2006 IP
  2. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #2
    why do you want to do it with javascript specifically? it'd be completely transparant with php
     
    disgust, Nov 27, 2006 IP
  3. ethanwa

    ethanwa Peon

    Messages:
    349
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    PHP is fine with me as well. Do you have an example I can see?
     
    ethanwa, Nov 27, 2006 IP
  4. pozer

    pozer Active Member

    Messages:
    603
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #4
    pozer, Nov 28, 2006 IP
  5. asapcorp

    asapcorp Banned

    Messages:
    725
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks for the link Pozer. Will look at it.

    Is it OK under TOS?
     
    asapcorp, Nov 28, 2006 IP
  6. quaffapint

    quaffapint Active Member

    Messages:
    299
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #6
    GeoTargeting is certainly ok with the TOS, in fact, YPN recommends you do it. There are many scripts that out that can do it for you, such as phpadsnew or mySimpleAds.

    Not only does it save your YPN account from being banned for too much international traffic, but it also makes you more money, since you won't lose the international YPN clicks, but instead you monetize them through AdSense clicks - Win-Win...

    -Matt
     
    quaffapint, Nov 28, 2006 IP
  7. ethanwa

    ethanwa Peon

    Messages:
    349
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    mySimpleAds is just awesome. thanks! I might get 50% more $ because of this!
     
    ethanwa, Nov 28, 2006 IP
  8. ethanwa

    ethanwa Peon

    Messages:
    349
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    The Geotargeting on this just isn't working well for some reason... is there a trick to it?
     
    ethanwa, Nov 28, 2006 IP