Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Legacy UniqueID after migration commanders act v4.x to v5.x #416

Closed
StaehliJ opened this issue Jan 25, 2024 · 0 comments · Fixed by #417
Closed

Use Legacy UniqueID after migration commanders act v4.x to v5.x #416

StaehliJ opened this issue Jan 25, 2024 · 0 comments · Fixed by #417
Assignees
Milestone

Comments

@StaehliJ
Copy link
Contributor

Issue

When migrating from CommandersAct v4.x to v5.x the unique id used in v4 changes in v5.

Analytics team want to have the same id for the same user before and after the migration. For new user everything is fine.

Discussed here : CommandersAct/iOSV5#13

Proposed solution

Workaround for Commanders Act migration from v4 to v5 to be done just after creation of TCServerSide. Tested in PLAY at https://github.com/SRGSSR/playsrg-android/pull/260

// 1. Use the TC unique id value for new `device.sdk_id` property.
 val uniqueId = TCPredefinedVariables.getInstance().uniqueIdentifier
 if (uniqueId.isNotEmpty()) {
    TCDevice.getInstance().sdkID = uniqueId
}
// 2. Use the TC unique id value for the new `user.consistent_anonymous_id` property.
TCPredefinedVariables.getInstance().useLegacyUniqueIDForAnonymousID()
@StaehliJ StaehliJ self-assigned this Jan 25, 2024
@StaehliJ StaehliJ added this to the Analytics milestone Jan 25, 2024
@MGaetan89 MGaetan89 linked a pull request Jan 25, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment