Skip to content

feat(audience-sdk): add EnableMobileAttribution + SKAdNetworkIds config (SDK-305)#741

Merged
nattb8 merged 1 commit intomainfrom
feat/sdk-305-mobile-attribution-flag
May 6, 2026
Merged

feat(audience-sdk): add EnableMobileAttribution + SKAdNetworkIds config (SDK-305)#741
nattb8 merged 1 commit intomainfrom
feat/sdk-305-mobile-attribution-flag

Conversation

@nattb8
Copy link
Copy Markdown
Collaborator

@nattb8 nattb8 commented May 6, 2026

Summary

Entry-point ticket for the mobile attribution stretch work. Adds two opt-in surfaces on AudienceConfig; downstream tickets (SDK-306, SDK-308, SDK-309, SDK-315) will wire them up to the manifest, Privacy Manifest, and native code paths.

  • EnableMobileAttribution (default false) — runtime gate for whether attribution data is collected and emitted on game_launch.
  • SKAdNetworkIds (string[], optional) — list of SKAdNetwork IDs the iOS post-processor injects into Info.plist at build time.

Two-gate model

The XML doc on EnableMobileAttribution spells this out, but in short: studios opt into attribution via both gates.

Scripting define AUDIENCE_MOBILE_ATTRIBUTION EnableMobileAttribution Result
unset any clean binary, no AD_ID permission, NSPrivacyTracking = false, no native attribution code
set false native code compiled in but no data collected (staged rollout)
set true full attribution flow

The build-time gate keeps the binary clean for studios that never opt in (no Apple review flag, no Play Store warning). The runtime gate allows staged rollouts via remote config.

Notes

  • Mobile-specific fields are intentionally not wrapped in #if UNITY_IOS || UNITY_ANDROID — that would force studios to wrap their bootstrap code in matching guards. Same convention as Firebase, Sentry, Unity Analytics: fields exist on all platforms, no-op where irrelevant.
  • No behavior changes yet. Setters compile and round-trip; nothing reads them.

Test plan

  • Unit tests for default values + round-trip on both new properties (AudienceConfigTests.cs)
  • CI green

@nattb8 nattb8 requested review from a team as code owners May 6, 2026 04:02
…ig (SDK-305)

Entry-point ticket for the mobile attribution stretch work. Adds two
opt-in surfaces; downstream tickets (SDK-306/308/309/315) wire them up:

- AudienceConfig.EnableMobileAttribution (default false): runtime gate
  for whether attribution data is collected and emitted on game_launch.
- AudienceConfig.SKAdNetworkIds: optional list, read by the iOS
  post-processor at build time when the scripting define is set.

XML doc on EnableMobileAttribution documents the two-gate model: studios
opt in via both the AUDIENCE_MOBILE_ATTRIBUTION scripting define and
this runtime flag. Without the define, no AD_ID permission, no native
attribution code, NSPrivacyTracking false; with define + flag false,
native code compiled in but no data collected; with both, full flow.
@nattb8 nattb8 force-pushed the feat/sdk-305-mobile-attribution-flag branch from 3ea4d79 to 32d8943 Compare May 6, 2026 04:16
@nattb8 nattb8 merged commit e6abbbd into main May 6, 2026
100 of 110 checks passed
@nattb8 nattb8 deleted the feat/sdk-305-mobile-attribution-flag branch May 6, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants