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

feat: made deviceId collection configurable and de-coupled anonymousid and deviceId #117

Merged

Conversation

desusai7
Copy link
Contributor

@desusai7 desusai7 commented Aug 24, 2023

Made device id collection by the SDK configurable and also stopped using deviceId as anonymous Id

  • Added a new property collectDeviceId in the MobileConfig class and when this property is set to false, SDK will not use the value of Device Id in any possible manner and you will observe the following changes:

    1. context.device.id will not be sent as part of the event payload
    2. If the value of anonymousId currently used by the SDK is equal to DEVICE_ID/IDFV, it will changed to a UUID and this would be reflected at context.traits.anonymousId and .anonymousId
  • Info: Till now, SDK would use DEVICE_ID/IDFV as anonymousId by default, if the user is not overriding the default value by using the putAnonymousId API.

  • For the Customers who are not overriding the default value of anonymousId, which means when the value of anonymousId is equal to DEVICE_ID/IDFV, upgrading to 2.5.0 and setting property collectDeviceId to false would change the anonymousId of all of your existing users to a new UUID.

  • Both the above changes are introduced to make the SDK more compliant with all the compliance policies around the collection of Device Id

  • Added a new reset API which would accept a boolean, if this API is called with true the anonymousId would also be refreshed/reset with a new UUID.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers mentioned in a comment
  • Changes have been reviewed by at least one other engineer
  • Issue from task tracker has a link to this pull request

@desusai7 desusai7 changed the title Feature/sdk 289 configurable collection of deviceid feat: made deviceId collection configurable and de-coupled anonymousid and deviceId Aug 24, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@desusai7 desusai7 marked this pull request as ready for review August 29, 2023 08:17
@desusai7 desusai7 self-assigned this Aug 29, 2023
@desusai7 desusai7 linked an issue Aug 29, 2023 that may be closed by this pull request
@desusai7 desusai7 merged commit 2861154 into develop Sep 4, 2023
@desusai7 desusai7 deleted the feature/sdk-289-configurable-collection-of-deviceid branch September 20, 2023 12:06
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.

Feature Request: Expose withCollectDeviceId
2 participants