Google Analytics for Desktop Application
Asked Answered
S

2

6

I wanted to have analytics for my upcoming alpha release so I can analyse how the program gets used, how often errors occur and so on.

Implementing an own approach of such is quite difficult and time consuming. Today I saw that the developers of the game "Rust" have implemented Google Analytics to track session times, average framerates based on system architecture and so on. So obviously desktop applications can use GA for that.

Now I did some research and I haven't found out anything. I have the C# assembly for Analytics V3 but I don't get how I can use it to report any data. I created a Developers Console project and added the Analytics API to the project.

But now? Analytics has only Website or Mobile App properties, authentication has only website, server or mobile apps but nowhere is something mentioned about desktop apps.

I've seldom seen such well undocumented features. Not even google spits out helpful information about the usage. All tutorials I can find are about ASP.Net websites and hence not helpful.

Does anybody know how this works? Is there any support planned on the part of Google? Is it even allowed (I guess so if Rust's developers use it)?

Thanks for any help!

Shaggy answered 24/9, 2014 at 14:44 Comment(1)
You can use C# to post a request to the GA measurement protocol: developers.google.com/analytics/devguides/collection/protocol/… Set up you GA view as web tracking.Pippo
T
2

You can use a packaged lib available on NuGet which does most of the heavy lifting of sending data to google analytics. The lib uses performance protocol as mentioned by @osowskit.

Here is the link to one of them. Its open sourced so you can modify the code to your needs.

https://www.nuget.org/packages/GoogleAnalyticsTracker/ Source - https://github.com/maartenba/GoogleAnalyticsTracker

Tweedsmuir answered 11/3, 2016 at 22:59 Comment(2)
From the above github link - "This library will not work when the Google Analytics account is configured as an app.". I guess this is not the library you are looking for!Hemimorphic
SoftMeter is another client lib for G.A. (native dll, packaged for NuGet). nuget.org/packages/libSoftMeter Disclaimer: I am its author.Hesketh
R
1

Rust game is based on Unity and Google has created Google Analytics Plugin for Unity that "...allows game developers to easily implement Google Analytics in their Unity games on all platforms, without having to write separate implementations.". That is probably what Rust developers are using.

The closest support for non-Unity desktop applications you can get from Google is Analytics Measurement Protocol which allows you "to send raw user interaction data directly to Google Analytics servers". That data could be visited screens/views, events, exceptions etc...For the comprehensive protocol description see Developer Guide.

Redtop answered 14/3, 2016 at 12:21 Comment(1)
Thanks for the info! I guess I can go with that. Shouldn't be too difficult to implement some simple usage statistics with that... Don't need that much information anyway.Shaggy

© 2022 - 2024 — McMap. All rights reserved.