Client stats

Started by Crimson Wizard, Thu 30/05/2013 10:25:04

Previous topic - Next topic

Crimson Wizard

AGS Editor tries to send user OS information to http://www.adventuregamestudio.co.uk/clientstats.php and fails.
When accessing this address, browser redirects to http://www.adventuregamestudio.co.uk/clientstats.php, which seem to exist, although I can't tell if it does anything.
Is there some database that keeps the info? Does it still work? Who can access it?
I am wondering if we should keep this functionality in the editor.

AGA

It does work.  Or at least it should, assuming I updated the script properly when we changed servers.  It's very hard to test though, given AGS doesn't report at a predictable, easily testable, interval.

The info is stored in a MySQL database.  Don't think CJ ever set up any reporting features though.  The database hasn't been updated since April 2012 (coincidentally when I took over the server...  (wtf)), but there's no obvious reason why it isn't working.

If the AGS project people would appreciate this usage data, I'm happy to work to fix it.  If you can tell me what headers / POST / GET / whatever are submitted to the PHP link, I can probably go from there.  Or let me know the C# (?) function that submits the info, and I can probably look it up.

Crimson Wizard

#2
Quote from: AGA on Thu 30/05/2013 11:54:54
It does work.  Or at least it should, assuming I updated the script properly when we changed servers.  It's very hard to test though, given AGS doesn't report at a predictable, easily testable, interval.
This is very easy to change by modifying an interval (like setting it to 5 seconds), or perhaps making it read a setting from registry. We may make a special build for such tests, if needed (or rather making a separate C# program, which sends the data on run).

The stats sending code:
Code: csharp

string osVersion = Environment.OSVersion.VersionString;
string netVersion = GetDotNetFrameworkVersion();
string agsVersion = AGS.Types.Version.AGS_EDITOR_VERSION;
string resolution = _screenWidth.ToString() + "x" + _screenHeight.ToString();

string queryString = string.Format(
    "action=sendinfo&winver={0}&dotnetver={1}&agsver={2}&resolution={3}",
    osVersion, netVersion, agsVersion, resolution);

WebClient client = new WebClient();
client.Headers.Add(HttpRequestHeader.ContentType,
    "application/x-www-form-urlencoded");
string response = client.UploadString(STATS_REPORT_URL, queryString);
if (response.Contains("200 Received"))
{
    _agsEditor.Preferences.StatsLastSent = DateTime.Now;
    _agsEditor.Preferences.SaveToRegistry();
}


WebClient is .NET class: http://msdn.microsoft.com/en-us/library/system.net.webclient(v=vs.80).aspx

DoorKnobHandle

How useful is this data nowadays? It used to be relevant when CJ wrote AGS 3 and moved to the .NET framework - but is any of that info relevant or interesting to anybody anymore?

Because the downside to leaving this functionality in is that, for most people, even anonymous data mining in a program like this causes a 'ugh' reaction, especially those new users that don't know CJ, the AGS community and such and just downloaded the editor to test it out and see if they like it. If we want to counteract the current trend of the AGS userbase becoming smaller and smaller, then we need to make sure that these users are catered towards and not put off by the datamining.

So, it's a trade-off: negative connotations of datamining vs. the usefulness of the mined data. I personally suspect the data isn't worth it anymore.

AGA

Quote from: Crimson Wizard on Thu 30/05/2013 12:15:30
Quote from: AGA on Thu 30/05/2013 11:54:54
It does work.  Or at least it should, assuming I updated the script properly when we changed servers.  It's very hard to test though, given AGS doesn't report at a predictable, easily testable, interval.
This is very easy to change by modifying an interval (like setting it to 5 seconds), or perhaps making it read a setting from registry. We may make a special build for such tests, if needed (or rather making a separate C# program, which sends the data on run).

The stats sending code:
Code: csharp

Some code


WebClient is .NET class: http://msdn.microsoft.com/en-us/library/system.net.webclient(v=vs.80).aspx

Okay, that looks straightforward enough.  I'll take a look at the script later, and will let you know if I need some sort of test build.

Quote from: DoorKnobHandle on Thu 30/05/2013 12:24:43
How useful is this data nowadays? It used to be relevant when CJ wrote AGS 3 and moved to the .NET framework - but is any of that info relevant or interesting to anybody anymore?

Because the downside to leaving this functionality in is that, for most people, even anonymous data mining in a program like this causes a 'ugh' reaction, especially those new users that don't know CJ, the AGS community and such and just downloaded the editor to test it out and see if they like it. If we want to counteract the current trend of the AGS userbase becoming smaller and smaller, then we need to make sure that these users are catered towards and not put off by the datamining.

So, it's a trade-off: negative connotations of datamining vs. the usefulness of the mined data. I personally suspect the data isn't worth it anymore.

I think the main benefit would be knowing how many people are using the new beta version(s) of AGS, as opposed to the old, established ones.  I was a bit confused by the whole "why is my firewall telling me AGS is accessing the Internet?!" thing at first too.  I suppose we could hack in an editor option to allow / not allow reporting stats though?

Crimson Wizard

#5
I made this test program, and received "200 Received" answer. Honestly, I don't know what does this mean :).
The program sends "CLIENT INFO TEST" instead of version number, so it will be possible to filter out test data.

http://www.mediafire.com/download/d04h21oqj81bhu7/SendUserData.exe

AGA

A 200 status means the page loaded fine.  Doesn't mean the page actually did anything with the data though!  I'll give it a poke later.

Crimson Wizard

#7
There's also a link for error reporting:
http://www.adventuregamestudio.co.uk/errorReport.php
redirects to
http://www.adventuregamestudio.co.uk/errorReport.php
Opening page in web browser displays a blank page with "Invalid form data" text, so that page does at least exist.
I will probably make another application to test how that works.


EDIT:
And updates check:
http://www.adventuregamestudio.co.uk/updatecheck.php
redirects to
http://www.adventuregamestudio.co.uk/updatecheck.php
but gives 404 error.

AGA

Finally got the chance to look at this.  Seems to be working.  I have a report coming from your IP address (at least the one you most recently posted on the forums from):




idwinverdotnetveragsverscreenresiptime
110230Microsoft Windows NT 6.1.7601 Service Pack 14.03.3.0.11321920x1080x.x.x.x2013-06-05 08:54:23

There are also a few with CLIENTINF as the agsver.

Crimson Wizard

Quote from: AGA on Sun 09/06/2013 15:33:03
There are also a few with CLIENTINF as the agsver.
So, it removes spaces and truncates the version string to 9 characters? Or rather in reverse order - truncates to 10 characters, then removes spaces.
3.3.0.1132 has 10 characters.

AGA

agsver was set as a VARCHAR(10) type, which meant they were being truncated to ten characters.  I expanded it to 20 characters, so it should be fine in future.  Spaces should be preserved, as they are with in the above example.  Maybe you have to pass the info in a certain way?

Crimson Wizard

Is there any way to know if error reports are successfuly getting to the server? If yes, is it possible to get that data?
Cat sent crash report recently.

Baron

Wow, am I disappointed.  I thought AGS had somehow began an actual conquest of the world and this thread was about client states. (roll)

SMF spam blocked by CleanTalk