Analytics Server Tracking

I am trying to track the use of a mobile application that receives data from a data file written in php. Therefore, I am using this script.

http://code.google.com/p/serversidegoogleanalytics/

However, it’s important for me to check the location of users in Google Analytics. but it does not seem affordable.

anyone could do that.

I create events, as shown in the example on the website, but the visitor’s location is always set in the USA, I believe that exactly where my server is located.

+5
source share
3 answers

EDIT . My previous answer was a bit wrong. I changed it.

, Google Analytics ; IP- . .. Google Analytics Google Analytics, HTTP- Google Analytics, IP- . ( , HTTP- User-Agent Google.)

, Google Analytics , utmip, , . , , PHP ( IP-.)

, MO-XXX-X, UA-XXX-X

: - Google Analytics UA- MO- . , - - UA-12345-67, MO-12345-67 .

PHP , , .

+6

Google, IP- , - :

// Construct the gif hit url.
string utmUrl = utmGifLocation + "?" +
    "utmwv=" + Version +
    "&utmn=" + GetRandomNumber() +
    "&utmhn=" + HttpUtility.UrlEncode(domainName) +
    "&utmr=" + HttpUtility.UrlEncode(documentReferer) +
    "&utmp=" + HttpUtility.UrlEncode(documentPath) +
    "&utmac=" + account +
    "&utmcc=__utma%3D999.999.999.999.999.1%3B" +
    "&utmvid=" + visitorId +
    //"&utmip=" + GetIP(Request.ServerVariables["REMOTE_ADDR"]);
    "&utmip=" + GetIP(Request.UserHostAddress);

SendRequestToGoogleAnalytics(utmUrl);

Google Analytics , .

- , utmip/? , IP-, , , .

(PS - MO -????)

0

All Articles