Geo WHAT? Geotracking? Tagging? Help here.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • srockhard
    Retired
    • Jul 2011
    • 1976

    #1

    Geo WHAT? Geotracking? Tagging? Help here.

    Using one ad, is it possible to clickthrough to a specific page depending on the users geo location?

    For instance if someone in Alaska clicked the ad then it might show a site about shoveling snow but if someone in Hawaii clicked the ad then it would show a site about surfing.

    Is this possible? What is it called and where can I get a script to do this?
    Piper Pines
  • shake
    frc
    • Jul 2003
    • 4663

    #2
    Yes, use something like maxmind geoip, and a couple lines of php code.
    Crazy fast VPS for $10 a month. Try with $20 free credit

    Comment

    • srockhard
      Retired
      • Jul 2011
      • 1976

      #3
      Originally posted by shake
      Yes, use something like maxmind geoip, and a couple lines of php code.
      Since I don't know PHP is there already written anywhere that you know of? Would this pretty easy to have custom?
      Piper Pines

      Comment

      • JamesM
        Confirmed User
        • Nov 2012
        • 732

        #4
        here you go


        Code:
        <html>
        <head>
        <script src="http://j.maxmind.com/app/geoip.js" type="text/javascript"></script>
        <script type="text/javascript">
            switch(geoip_country_code()){
                case "AT" :
                    document.location.href = "http://austriatraffic.com";
                    break;
                case "CH" :
                    document.location.href = "http://switzerlandtraffic.com"
                    break;
                case "DE" :
                    document.location.href = "http://germantraffic.com"
                    break;
        	case "IN" :
                 document.location.href = "http://indiatraffic.com"
                    break;
                default :
                    document.location.href = "http://othertraffic.com.com"
                    break;
            }
        </script>
        </head>
        </html>
        in above code, you just have add specific country codes from which traffic and the target url

        like this
        case "IN" :
        document.location.href = "http://indiatraffic.com"
        break;

        hope this helps.,
        Last edited by JamesM; 12-15-2012, 11:05 PM.


        Ex GF Films | Grab Dollars
        Up To 80% Rev-Share | 255 Day Cookie | Legal Content | Variety of Promo Tools | CCBill Program | GF Niche
        james[at]grabdollars[dot]com | ICQ::611-99-zero-zero-20

        Comment

        • srockhard
          Retired
          • Jul 2011
          • 1976

          #5
          This looks real good...I will give it a try tomorrow. What about geo codes on the state and city level...all of which will be in the United States? Is it possible to get that specific?
          Piper Pines

          Comment

          • JamesM
            Confirmed User
            • Nov 2012
            • 732

            #6
            Originally posted by srockhard
            This looks real good...I will give it a try tomorrow. What about geo codes on the state and city level...all of which will be in the United States? Is it possible to get that specific?
            access this link

            http://j.maxmind.com/app/geoip.js

            you will get something like this


            Code:
            function geoip_country_code() { return 'DE'; }
            function geoip_country_name() { return 'Germany'; }
            function geoip_city() { return 'Berlin'; }
            function geoip_region() { return '16'; }
            function geoip_region_name() { return 'Berlin'; }
            function geoip_latitude() { return '52.5167'; }
            function geoip_longitude() { return '13.4000'; }
            function geoip_postal_code() { return ''; }
            function geoip_area_code() { return ''; }
            function geoip_metro_code() { return ''; }
            you can catch every variable from above list.,

            like the script i posted b4 using geoip_country_code()

            you can set to any of the above.

            try it.,


            Ex GF Films | Grab Dollars
            Up To 80% Rev-Share | 255 Day Cookie | Legal Content | Variety of Promo Tools | CCBill Program | GF Niche
            james[at]grabdollars[dot]com | ICQ::611-99-zero-zero-20

            Comment

            • EddyTheDog
              Just Doing My Own Thing
              • Jan 2011
              • 25433

              #7
              Originally posted by JamesM
              access this link

              http://j.maxmind.com/app/geoip.js

              you will get something like this


              Code:
              function geoip_country_code() { return 'DE'; }
              function geoip_country_name() { return 'Germany'; }
              function geoip_city() { return 'Berlin'; }
              function geoip_region() { return '16'; }
              function geoip_region_name() { return 'Berlin'; }
              function geoip_latitude() { return '52.5167'; }
              function geoip_longitude() { return '13.4000'; }
              function geoip_postal_code() { return ''; }
              function geoip_area_code() { return ''; }
              function geoip_metro_code() { return ''; }
              you can catch every variable from above list.,

              like the script i posted b4 using geoip_country_code()

              you can set to any of the above.

              try it.,
              I did not know they where doing that - I have been using the DB on my own server - I will have a look at the rate limits, I might use that instead....

              Thanks

              Comment

              • Oracle Porn
                Affiliate
                • Oct 2002
                • 24433

                #8
                Originally posted by JamesM
                here you go


                Code:
                <html>
                <head>
                <script src="http://j.maxmind.com/app/geoip.js" type="text/javascript"></script>
                <script type="text/javascript">
                    switch(geoip_country_code()){
                        case "AT" :
                            document.location.href = "http://austriatraffic.com";
                            break;
                        case "CH" :
                            document.location.href = "http://switzerlandtraffic.com"
                            break;
                        case "DE" :
                            document.location.href = "http://germantraffic.com"
                            break;
                	case "IN" :
                         document.location.href = "http://indiatraffic.com"
                            break;
                        default :
                            document.location.href = "http://othertraffic.com.com"
                            break;
                    }
                </script>
                </head>
                </html>
                in above code, you just have add specific country codes from which traffic and the target url

                like this



                hope this helps.,
                is it possible to use my own maxmind geo ip (on my server) rather then use theirs?


                Comment

                • srockhard
                  Retired
                  • Jul 2011
                  • 1976

                  #9
                  Originally posted by JamesM
                  access this link

                  http://j.maxmind.com/app/geoip.js

                  you will get something like this


                  Code:
                  function geoip_country_code() { return 'DE'; }
                  function geoip_country_name() { return 'Germany'; }
                  function geoip_city() { return 'Berlin'; }
                  function geoip_region() { return '16'; }
                  function geoip_region_name() { return 'Berlin'; }
                  function geoip_latitude() { return '52.5167'; }
                  function geoip_longitude() { return '13.4000'; }
                  function geoip_postal_code() { return ''; }
                  function geoip_area_code() { return ''; }
                  function geoip_metro_code() { return ''; }
                  you can catch every variable from above list.,

                  like the script i posted b4 using geoip_country_code()

                  you can set to any of the above.

                  try it.,

                  I really appreciate your help! Works perfectly!
                  Piper Pines

                  Comment

                  • JamesM
                    Confirmed User
                    • Nov 2012
                    • 732

                    #10
                    Originally posted by EddyTheDog
                    I did not know they where doing that - I have been using the DB on my own server - I will have a look at the rate limits, I might use that instead....

                    Thanks
                    http://dev.maxmind.com/geoip/javascript

                    Code:
                     Free use of the service is allowed, if the following link is included on your website:
                    
                    This website uses <a href="http://www.maxmind.com/en/javascript">MaxMind's
                    GeoIP JavaScript Service</a>


                    Originally posted by Oracle Porn
                    is it possible to use my own maxmind geo ip (on my server) rather then use theirs?
                    i guess , its possible. but you have to update maxmind geo ip database file on your server , every month.

                    Originally posted by srockhard
                    I really appreciate your help! Works perfectly!
                    please take a look at

                    http://dev.maxmind.com/geoip/javascript

                    and imho , you should use something with php as this method wont work if browsers have javascript disabled.

                    thanks


                    Ex GF Films | Grab Dollars
                    Up To 80% Rev-Share | 255 Day Cookie | Legal Content | Variety of Promo Tools | CCBill Program | GF Niche
                    james[at]grabdollars[dot]com | ICQ::611-99-zero-zero-20

                    Comment

                    • seeandsee
                      Check SIG!
                      • Mar 2006
                      • 50945

                      #11
                      this scripts looks good, but serving it from your own server just using their db would be even better
                      BUY MY SIG - 50$/Year

                      Contact here

                      Comment

                      • borked
                        Totally Borked
                        • Feb 2005
                        • 6284

                        #12
                        or you can use geoplugin
                        Last edited by borked; 12-16-2012, 02:12 PM.

                        For coding work - hit me up on andy // borkedcoder // com
                        (consider figuring out the email as test #1)



                        All models are wrong, but some are useful. George E.P. Box. p202

                        Comment

                        • EddyTheDog
                          Just Doing My Own Thing
                          • Jan 2011
                          • 25433

                          #13
                          Originally posted by borked
                          or you can use geoplugin
                          That is an awesome API as well.

                          Comment

                          Working...