question

laurentiumarianivan avatar image
laurentiumarianivan asked

Login event only once or query events with unique player id,Write event only once or show only events with unique players.

Hello.

I wanna log each app install, successful login(I know this is done automatically, but still I wanna write my own event for that).
What would be the way to do it? I don't want it to log the authentication or the app instalation each time the same user logs in or uninstalls and reinstalls the game, or if it really must log each time it does it, how can I query the database to only give the events with unique device ids? What I am trying right now is:
 PlayFabClientAPI.WritePlayerEvent(new WriteClientPlayerEventRequest
{
EventName = "player_logged_facebook",
}, null, null);
,

Hello.
I wanna log each app install, successful login(I know this is done automatically, but still I wanna write my own event for that).
What would be the way to do it? I don't want it to log the authentication or the app instalation each time the same user logs in or uninstalls and reinstalls the game, or if it really must log each time it does it, how can I query the database to only give the events with unique device ids? What I am trying right now is:

 PlayFabClientAPI.WritePlayerEvent(new WriteClientPlayerEventRequest
{
EventName = "player_logged_facebook",
}, null, null);
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

·
JayZuo avatar image
JayZuo answered

You can store the device ids with Player Data by using UpdateUserData method. And every time, when the player logged in, you can retrieve the device ids with GetUserData and check if current device id is in those retrieved device ids. If not, you can then write a event and add the current device id into player data. This would be able to make sure you write event only once with each player on each device.

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.