question

kevin-6 avatar image
kevin-6 asked

Session ID / Session Ticket

We would like to add a "session id" to some of our custom analytics events. There's a session ticket that can be retrieved from a login result, but I just want to double check that this would work as a session ID and that it's safe to send in an event.

Thanks

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

Under the hood, PlayFab uses RESTful API to interact with the PlayFab services. As RESTful API is stateless, there is no session in it, thus no "session id". And session ticket is a token used to verify a user's identity. If you store this elsewhere, it might cause security issue as while the ticket is valid, anyone has this ticket can perform requests against this player. The session ticket should only be used for the player who is currently playing the game and anyone else should not have it.

I'm not sure why you want to add a "session id" to your analytics events, usually the PlayFab Id should be enough for analyzing. If you have any other concern or requirement, please feel free to let us know.

3 comments
10 |1200

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

kevin-6 avatar image kevin-6 commented ·

We are using playfabs Snowflake integration for our analytics platform as the out of the box analytics provided by playfab are not sufficient for our needs. Our analysis would like to know things like "How many levels do our players play in a session". Sounds like we'll need to roll our own session ID.

0 Likes 0 ·
Andy avatar image Andy ♦♦ kevin-6 commented ·

Before rolling your own session tracking, do take a look at our new Session Tracking feature: https://api.playfab.com/docs/tutorials/landing-analytics/analytics-metrics/sessions. It's only available in Unity right now, but it might get you what you need with less effort.

0 Likes 0 ·
Good Guy avatar image Good Guy Andy ♦♦ commented ·

Where has that webpage moved to? It currently redirects to search results.

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.