question

Rob Alvarez avatar image
Rob Alvarez asked

Segments: What is the best way to grant reward for users who spend 1hr a day for a week using segments?

Trying to get some information for our designers and future project manager about the usage of segments to reward players who sink an hour of gameplay during a specific date range. What would be the best way to do this?

Player DatamultiplayerPlayer InventoryContent
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

·
Sarah Zhang avatar image
Sarah Zhang answered

PlayFab API is the stateless REST API, there is not a concept such as player online time. The workaround to calculate the active time is to send the event to PlayFab when the client’s focus changes, then calculate their time difference on the server. PlayFab provides pre-defined ScreenTimeTracker class that designed to send the “focus changed” event, you can find the code in the Unity SDK. If you use other platforms’ SDK, you can implement the similar method on your own. You can store the flags in player internal data to mark whether the player meets the requirements for rewards, then reward them using Rule when they meet it. If you only want to reward the player who are active for 1 hour per day within a week, you needn’t to use Segments. If it’s necessary for you to use the segment, feel free to let us know.

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.