I want to use google analytics to collect raw data send from a mobile game that I'm currently developing under unity, the game is an endless runner and I want to collect the "player_score" and the "level_name" each time the game ends.
so inside my GA account I have created a property with 2 custom dimensions "player_score" and "level_name" and set them to active, I am using events to send data to GA using the following code:
EventHitBuilder eventHitBuilder = new EventHitBuilder();
eventHitBuilder.SetEventCategory("game")
.SetEventAction("test")
.SetEventLabel("test")
.SetCustomDimension(1, levelName)
.SetCustomDimension(2, score);
googleAnalytics.LogEvent(eventHitBuilder);
My questions are:
Ps: it's my first experience with GA, if the answers are very long just direct me and give me references I can handle.
thanx.
Every event gets sent up with a category, action, label and an optional value. The value is an integer, that would work well with the score of your game. Yes, you can can optionally include custom dimensions to add other data to GA that is associated with that event.
You'd probably want to fire an event after a given amount of progress is made, that way you could look like: Category: Game Action: Progress Label: [number of steps] Value: [score]
You could then sort players with the progress event category by label and see how many people played and how far they got. You'd then have a score associated with each hit.
You could do this with custom dimensions, but there seems to be no need.
More details on the Events support page.