fix(audience): lock context.libraryVersion to the SDK version#793
Merged
Conversation
context.libraryVersion is the analytics identity of the tracking library itself, used to segment telemetry by SDK version. It was developer-overridable via AudienceConfig.PackageVersion, letting arbitrary values pollute that signal. The override was also unused internally. Source libraryVersion from Constants.LibraryVersion at the Track / Identify / Alias call sites and remove the public PackageVersion property. Drift from package.json stays guarded by ConstantsTests.LibraryVersion_MatchesPackageJson. Breaking: removes public AudienceConfig.PackageVersion. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
AudienceConfig.PackageVersion was removed; the sample's diagnostic config echo no longer compiles against it. libraryVersion is no longer a config value, so it is dropped from the echo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
JCSanPedro
approved these changes
Jun 15, 2026
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.
Fixes SDK-489.
context.libraryVersionidentifies the tracking library itself, and we rely on it to segment audience telemetry by SDK version (it is how the recent IL2CPP stripping regression was diagnosed). Game developers could override it through the publicAudienceConfig.PackageVersionproperty, which let arbitrary values land in that field and undermine the signal. This pinslibraryVersionto the SDK's own version and removes the override.The version still comes from
Constants.LibraryVersion, whichConstantsTests.LibraryVersion_MatchesPackageJsonalready keeps in sync withpackage.json, so there is no risk of it drifting.Breaking change: removes the public
AudienceConfig.PackageVersionproperty (minor bump on the 0.x line). It was unused internally. If developers need to report their own game/app version later, that should be a dedicated field rather than reusinglibraryVersion.🤖 Generated with Claude Code