Just to give you a fair warning, if you do the following you may not
get all the data in your reports that you want, because Analytics
relies on Cookies for a lot of things. You could potentially track
that yourself in a PHP session (based on their user=12), but I leave
that as an excersize to the reader.
The most important thing you'll need to do is make your C++ client
load an image (it doesn't have to render it, or even do anything with
it, just call the URL with your HTTP GET function). The parameters in
the URL for that image contain all the data that is sent back to GA to
track the user.
Here's the URL
http://www.google-analytics.com/__utm.gif?
utmwv=3&
utmn=<random number>&
utme=&
utmcs=ISO-8859-1&
utmsr=1280x1024&
utmsc=24-bit&
utmul=en-us&
utmje=1&
utmfl=-&
utmhn=<www.mtptarget>&
utmhid=2112093191&
utmr=-&
utmp=/login.php?user=12&
utmac=UA-XXXXX-1&
utmcc=
__utma%3D1.<unique id>.<time (in sec's since Jan 1, 1970) of first
visit).<time of last visit>.<time of current visit>.<visit count>%3B
%2B
__utmz%3D1.1203103189.1.1.utmcsr%3D<source>%7Cutmccn%3D<campaign>
%7Cutmcmd%3D<medium>%3B
On Feb 15, 4:23 am, acemtp wrote:
> I have a online game and I would like to track the player connection.
> My game is a C++ game like World of Warcraft, when the client connects
> to the server, it get an url like "http://www.mtp-target/login.php?
> user=12". And in return, the page contains some token that the client
> analyse.
> Since it's a C++, i don't have javascript on the client so i cannot
> execute the analytics javascript code.
> I would like to know if I can add some code on the server side to
> generate a pageview. In this case, the server will be able to generate
> a pageview when the client call a special page.