Skip to content

feat: Support UserIdentificationType in AppsFlyer Kit#692

Merged
nickolas-dimitrakas merged 2 commits intoworkstation/9.0-Releasefrom
feat/appsflyer-user-identification-type
Mar 31, 2026
Merged

feat: Support UserIdentificationType in AppsFlyer Kit#692
nickolas-dimitrakas merged 2 commits intoworkstation/9.0-Releasefrom
feat/appsflyer-user-identification-type

Conversation

@nickolas-dimitrakas
Copy link
Copy Markdown
Contributor

@nickolas-dimitrakas nickolas-dimitrakas commented Mar 31, 2026

Background

What Has Changed

  • Add userIdentificationType config so AppsFlyer's customer user ID can follow MPID, CustomerId, or legacy behavior
  • Sync AppsFlyer customer user ID on identity callbacks (onIdentifyComplete, onLoginComplete, onLogoutComplete, onModifyComplete)
  • setUserIdentity in MPID mode ignores customer-ID identity for AppsFlyer's customer user ID but still returns success
  • Commerce and event routing resolve af_customer_user_id via customerIDForAppsFlyer:
  • Mock now records writes to AppsFlyer's customerUserID property for test assertions
  • New tests cover setUserIdentity for legacy, CustomerId, and MPID modes plus email and unsupported identity types

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Reference Issue (For employees only. Ignore if you are an outside contributor)

  • NO JIRA

Duplicate changes from mparticle-apple-integration-appsflyer PR #54
into the monorepo AppsFlyer kit (appsflyer-6).

- Add userIdentificationType config (MPID, CustomerId, legacy)
- Sync AppsFlyer customer user ID via identity callbacks
- Route commerce/event af_customer_user_id through customerIDForAppsFlyer:
- MPID mode skips setCustomerUserID on setUserIdentity:customerId
- Add mock tracking and tests for all identity modes

Made-with: Cursor
@nickolas-dimitrakas nickolas-dimitrakas requested a review from a team as a code owner March 31, 2026 16:59
@cursor
Copy link
Copy Markdown

cursor bot commented Mar 31, 2026

PR Summary

Medium Risk
Changes how the kit selects and syncs AppsFlyer customerUserID (MPID vs CustomerId) and updates it on identity callbacks, which can affect attribution/user linking. Scope is contained to the AppsFlyer kit and covered by new unit tests.

Overview
Adds a new userIdentificationType configuration to control whether AppsFlyer customerUserID follows the mParticle MPID, the mParticle CustomerId, or legacy behavior.

The kit now syncs customerUserID at init and on identity lifecycle callbacks (onIdentifyComplete, onLoginComplete, onLogoutComplete, onModifyComplete), and ensures commerce/events attach af_customer_user_id using the configured identifier. Tests were expanded with a mock that tracks customerUserID writes and new cases covering MPID/CustomerId/legacy modes and unsupported identities.

Written by Cursor Bugbot for commit f5c380c. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 31, 2026

📦 SDK Size Impact Report

Measures how much the SDK adds to an app's size (with-SDK minus without-SDK).

Metric Target Branch This PR Change
App Bundle Impact 1.66 MB 1.66 MB +N/A
Executable Impact 896 bytes 896 bytes +N/A
XCFramework Size 5.47 MB 5.47 MB +N/A

➡️ SDK size impact change is minimal.

Raw measurements

Target branch (workstation/9.0-Release):

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1788,"with_sdk_executable_size_bytes":76360,"sdk_impact_kb":1704,"sdk_executable_impact_bytes":896,"xcframework_size_kb":5604}

This PR:

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1788,"with_sdk_executable_size_bytes":76360,"sdk_impact_kb":1704,"sdk_executable_impact_bytes":896,"xcframework_size_kb":5604}

Copy link
Copy Markdown
Contributor

@denischilik denischilik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few changes, the rest looks good

…serIdentity

Address PR review feedback:
- Extract repeated MPKitExecStatus success creation into successStatus helper
- Simplify setUserIdentity by removing duplicated success status branches

Made-with: Cursor
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Copy link
Copy Markdown
Contributor

@denischilik denischilik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nickolas-dimitrakas nickolas-dimitrakas merged commit e66566f into workstation/9.0-Release Mar 31, 2026
71 checks passed
@nickolas-dimitrakas nickolas-dimitrakas deleted the feat/appsflyer-user-identification-type branch March 31, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants