Analytics
Analytics
Playtime, sessions, retention, ad impressions and conversion are measured by the portal automatically. You do not instrument them and there is no SDK call for them. The gameplay events are what make those numbers accurate.
The analytics module has one method today:
trackOrder(provider: string, order: unknown): Promise<void>provider is a non-empty string naming the payment provider, and order is that provider's order object. Both are sent to the portal. An empty provider rejects with invalidArgument. Today the portal acknowledges the call without storing the order, because in-game purchases are not generally available.
await SDK.analytics.trackOrder("provider-name", order);This call is only meaningful for games that have in-game purchases enabled, which is currently by invitation. See in-game purchases.
Your own analytics#
You may add your own analytics tools, as long as they respect these limits:
- No third-party advertising or tracking SDKs that profile players.
- If you collect personal data beyond what the portal provides, show a clear privacy notice and link to your policy.
- Do not slow the first frame; load analytics scripts after
gameplayStart.