question

Benjamin Golinvaux avatar image
Benjamin Golinvaux asked

Analytics report on custom JSON data

Hello

I have a question regarding anayltics/events that you might help me with.

Let's say that I some point in my game, from the client, I send a player_match_start event (with WriteClientEvent) with the following:

"Body": {
    "PlayerData": {
        "Character": "Elf",  # can be chosen among a fixed list of values        
        "Spendings": 125
    }
}

I wonder if the following question requires writing a front ent on my own or can be done within the existing analytics GUI. I tried to, but so far haven't managed to get a meaningful result.


I would like:

  • to count the number of player_match_start events
  • to count the number of player_match_start events where character is Elf
  • to count the total amount of Spendings across all events
  • to count the total amount of Spendings across all events where Character is Elf
I RTFM but it doesn't seem to work or I am soing something wrong.
Any help or pointer would be greatly appreciated.

Thanks a lot in advance!

Benjamin

analytics
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

You can check the events at [Game Manager]->[Data]->[Data Explorer(advanced)]. With KQL below, you can find all events that event name is “player_match_start”,

['events.all']
| where FullName_Name == "player_match_start"
| count

or character is “Elf”.

['events.all']
| where FullName_Name == "player_match_start"
| where EventData.PlayerData.Character == "Elf"
| count

With KQL below, you can get the sum of Spendings across events that name is “player_match_start”,

['events.all']
| where FullName_Name == "player_match_start"
| summarize Spendings=sum(EventData.PlayerData.Spendings*1)

or character is “Elf”.

['events.all']
| where FullName_Name == "player_match_start"
| where EventData.PlayerData.Character == "Elf"
| summarize Spendings=sum(EventData.PlayerData.Spendings*1)
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Benjamin Golinvaux avatar image Benjamin Golinvaux commented ·

Thank you very much, Gosen! This is exactly what I needed :)

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.