Skip to main content
PIO shows no consent UI. Your consent management platform owns the user-facing experience; the SDK trusts a single boolean. While TrackingEnabled is false, zero bytes leave the device: no authentication, no decisions, no events.
Samples~/BasicIntegration/Assets/Scripts/GuideExamples.cs

Data sent when tracking is enabled

The SDK sends data used to choose options, learn from outcomes and check integration health:
  • A pseudonymous user id, persisted on the device, and a session id. These connect decisions with later outcomes.
  • Decision records, including the selected option or baseline and the player context supplied for that decision.
  • Event records and any values you send. Foreground play-time heartbeats are also sent unless disabled.
  • Device and platform fields attached to event records.
  • Device region, collected for comparison with the country inferred by the service.
  • SDK diagnostic metadata, including the SDK version reported in integration health.
Send only the events your decisions or rewards use. Review the context you supply through SetState alongside your event data. The API reference documents identity and context. The SDK changelog records device fields, region collection and child-directed handling.

The transitions

  • The default is TrackingEnabled = true, matching the convention of comparable Unity SDKs. Studios in consent-required regions must start with false and wait for their CMP.
  • Turning tracking off purges any unflushed events from the local queue: withdrawal of consent is as complete as giving it.
  • Turning tracking on performs the deferred authentication and connection warming, then resumes normal operation.
  • While disabled, GetDecision returns a Baseline result without a payload or network call; getters return your defaults.

Child-directed projects

Whether a project is child-directed is attested at project creation in the dashboard, and the answer rides along with the data the SDK collects. It cannot be set from code. A project created by an agent through the MCP server starts under a not-child-directed default and accepts events at once. This provisional default lets integration begin while reserving the audience declaration for a studio member, rather than an agent. A studio member must set and confirm the correct answer in project settings within 14 days, or the key is unpublished. Agents cannot change this answer through MCP. For child-directed projects, the SDK suppresses App Tracking Transparency (ATT) and advertising-id capture. Confirm the audience setting before collecting data for that audience.

Wiring a CMP

The pattern is the same for every vendor: initialise with tracking off, subscribe to the CMP’s consent-changed callback, and call SetTrackingEnabled with the resolved analytics consent. The SDK repository’s documentation folder carries worked examples for Didomi, OneTrust, Usercentrics, and Axeptio.