feat(audience): auto-collect platform ID on consent upgrade to Full#800
Closed
nattb8 wants to merge 1 commit into
Closed
feat(audience): auto-collect platform ID on consent upgrade to Full#800nattb8 wants to merge 1 commit into
nattb8 wants to merge 1 commit into
Conversation
Previously Steam and Epic identity collection only ran at Init. Games that start with Anonymous consent and upgrade to Full via SetConsent never had the platform ID collected automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
Author
|
Reverting — firing on consent upgrade adds DX complexity for limited gain. The platform session (EOS login especially) is often not ready at the moment SetConsent is called, so it silently skips anyway. The consent-cycle case also creates an identity overwrite trap. Init-only is simpler and more predictable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Previously Steam and Epic identity collection only ran at
Init. Games that start withAnonymousconsent and upgrade toFullviaSetConsentnever had the platform ID collected, leaving a gap in identity data for the common consent-prompt flow.The fix adds
TryIdentifySteamUserandTryIdentifyEpicUsertoSetConsent, gated on a genuine upgrade toFull(level == Full && previous != Full). The same two methods already run atInit, so behaviour is consistent across both entry points.Closes SDK-539 / part of SDK-534.
Use case gotchas
If a game calls
Identifywith its own backend user ID and then cycles consent (Full → Anonymous → Full), auto-collection fires again on the upgrade and sets the platform ID as the active user ID. The dev needs to callIdentifyagain with their game user ID after the upgrade — this is expected behaviour since the downgrade already cleared identity state.If the platform session is not active at the moment consent reaches
Full(Steam not running, EOS not yet logged in), collection is silently skipped. Devs who need identity reliably in that scenario should callIdentifymanually once the platform session is ready.Test plan
Anonymous, upgraded toFullviaSetConsent—identifyevent withidentity_type='steam'firesAnonymous, upgraded toFullviaSetConsent—identifyevent withidentity_type='epic'firesSetConsent(Full)when alreadyFull— auto-collection does not fire again🤖 Generated with Claude Code