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

how can i check what country my traffic's coming from?

Discussion in 'Black Hat SEO' started by Ranko Jones, Mar 5, 2013.

  1. Ranko Jones

    Ranko Jones BANNED BANNED

    Joined:
    Mar 3, 2011
    Messages:
    1,677
    Likes Received:
    146
    i dont want to sign up to analytics bullshit.

    i currently have statpress however it only tells me 'EN' as the traffic source which doesnt tell me shit because i want to know whether it came form US or UK so i can know which to target.

    So how could i check where its been coming form?
     
  2. umerjutt00

    umerjutt00 Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 28, 2011
    Messages:
    3,644
    Likes Received:
    1,904
    Occupation:
    Ninja
  3. Smart SEO

    Smart SEO Senior Member

    Joined:
    Apr 17, 2011
    Messages:
    857
    Likes Received:
    759
    Location:
    Google HQ
    cpanel has a good traffic statistic counter

    Sent from my Samsung Galaxy Note 2
     
  4. androide

    androide Junior Member

    Joined:
    Jul 2, 2012
    Messages:
    114
    Likes Received:
    17
    setup TDS if you send traffic to CPA etc..
     
  5. Endire

    Endire Elite Member Premium Member

    Joined:
    Mar 27, 2012
    Messages:
    1,756
    Likes Received:
    1,061
    Gender:
    Male
    Ranko,

    If you don?t want to use a third party service, you could try tracking visitors based on an IP address using a php script.

    The following code will do it,

    Code:
    <?PHP
    function visitor_country()
    {
        $client  = @$_SERVER['HTTP_CLIENT_IP'];
        $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
        $remote  = $_SERVER['REMOTE_ADDR'];
        $result  = "Unknown";
        if(filter_var($client, FILTER_VALIDATE_IP))
        {
      $ip = $client;
        }
        elseif(filter_var($forward, FILTER_VALIDATE_IP))
        {
       $ip = $forward;
        }
        else
        {
       $ip = $remote;
        }
     $ip_data = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ip));
        if($ip_data && $ip_data->geoplugin_countryName != null)
        {
       $result = $ip_data->geoplugin_countryName;
        }
       return $result;
        }
    echo visitor_country(); // Output Coutry name [Ex: United States]
    ?>
    Alternatively, you could use the API here,

    http://ipinfodb.com/ip_location_api.php

    Hope that gives you some ideas,

    Shawn