question

giorgiotino avatar image
giorgiotino asked

Use Explorer to filter custom events by DeviceInfo

The PlayFab built in event "player_device_info" sends a lot of useful info regarding the player DeviceInfo. This kind of info is not included in any other event, but we would love to be able to filter our custom events by e.g. EventData.DeviceInfo.OperatingSystem and such.

I'd love to know, for example, how many players complete our tutorial (we send custom events at every step) based on the game Version (to see how changes in our code perform) or iOS versions.

Is there any way to link any custom event (e.g. in the Explorer queries) to the DeviceInfo of the device that actually generated it? We can of course send the OperatingSystem version or the game Version as an additional parameter for every custom event, but I would prefer to use a built-in PlayFab specific way to access this info if possible.

Thanks in advance!

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.

giorgiotino avatar image
giorgiotino answered

Thanks for the answer,

I have filed a Feature Request, but I am trying to figure out if there's already a way to query the Event DB with kql to actually figure out what I need.

This query seems to be close to what I need:

let level_completed_1 = ['events.all'] | where FullName_Name == "level_completed" | where tolong(EventData.Level) == 1;
let level_failed_1 = ['events.all'] | where FullName_Name == "level_failed" | where tolong(EventData.Level) == 1;
let player_device_info = ['events.all'] | where FullName_Name == "player_device_info";
player_device_info
| project Entity_Id, Version = tostring(EventData.DeviceInfo.Version), Platform = tostring(EventData.DeviceInfo.Platform), OperatingSystem = tostring(EventData.DeviceInfo.OperatingSystem)
| join level_completed_1 on Entity_Id
| summarize Completed_By=count() by Version;
player_device_info
| project Entity_Id, Version = tostring(EventData.DeviceInfo.Version)
| join level_failed_1 on Entity_Id
| summarize Failed_by=count() by Version; 

But the problem is that the join will match any event to the latest Version, not the Version that was running at the timestamp when each event happened.

I should probably run something like this, to know for each Entity_Id what was the min timestamp for each version:

player_device_info
| project Entity_Id, Version = tostring(EventData.DeviceInfo.Version), Platform = tostring(EventData.DeviceInfo.Platform), OperatingSystem = tostring(EventData.DeviceInfo.OperatingSystem), Timestamp
| where Version in ("1.0.1", "1.0.2", "1.0.3")
| summarize min(Timestamp) by Entity_Id, Version
| order by Entity_Id asc;

and then based on that, for each event, check it's timestamp and see what version was running at that moment in time. This last step is an issue as I am not an expert of kql and I cannot figure out how to perform such query, if possible.

Can you help me? Thanks!

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.

Seth Du avatar image Seth Du ♦ commented ·

It is not easy for us to reproduce this scenario, We also don't have the direct query permission for your title. I believe you will need to refer to kql documentation and get more help from Azure Data Explorer related support channel.

0 Likes 0 ·
Rick Chen avatar image
Rick Chen answered

I’m afraid that there is no build-in method to link DeviceInfo into your custom event. You need to get the device info yourself and attach to the custom event.

If you would like this build-in feature, you may post a thread in Feature Request Forum.

10 |1200

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

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.