Redirect users based on their states using maxmind API

Share love!

Sometimes when promoting CPA campaigns on PPV i create separate landing pages targeting different states in the US for example when i was promoting Obama CPA Offer back in days of US presidential election i create separate landing pages for all major and states  and targeted them with those landing pages .

I am going to share with you guys code using which you can make it possible to redirect users based on their states ,

 

The above script will redirect visitors from New York state to KJ Rocker Blog and Visitors from Texas to  Rocker Interactive  And all other traffic will be redirected to google.com you can easily add more states by copying and pasting else if part and add as many states as you want (don`t forget to replace state codes with your targeted states , you can find all state/region codes in US here .   Tracking such campaigns with prosper  is a headache so i would recommend you to use CPVLAB for tracking such campaigns (find $50 off on cpvlab coupon here ,

About Kj Rocker

Hi there my name is KJ and I am the owner of KJ Rocker Blog And C.E.O KJ Rocker F.Z.E . I am an affiliate marketer, and online marketing consultant living Dubai Life. My biggest achievement is not only turning my affiliate life dream into reality, but also i have helped many others through my coaching program to achieve success.
Want to be successful ? Follow me on twitter or join myFacebook group to find out more!

Comments

  1. Thanks, this script useful.

    Does the same could be done with countries?

  2. Hi,

    I’m wondering, is there a limit to the number of calls you can make using this technique?

    I have a site where I might need to redirect 200k people in the US per month based on their State – would I need to pay for an enhanced service from maxmind, with such large numbers, or would your code still work ok?

    Many thanks in advance!

Speak Your Mind

*