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 #232

Merged

Conversation

desusai7
Copy link
Contributor

@desusai7 desusai7 commented Aug 23, 2023

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

  • Added a new property collectDeviceId in the Configuration Interface 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.12.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 self-assigned this Aug 23, 2023
@rudderlabs rudderlabs deleted a comment from linear bot Aug 23, 2023
Co-authored-by: Abhishek Pandey <64667840+1abhishekpandey@users.noreply.github.com>
bardisg
bardisg previously approved these changes Aug 31, 2023
@1abhishekpandey 1abhishekpandey dismissed stale reviews from bardisg and themself via 38bb61e September 1, 2023 10:38
@sonarcloud
Copy link

sonarcloud bot commented Sep 1, 2023

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@1abhishekpandey 1abhishekpandey merged commit c600d20 into develop Sep 1, 2023
9 checks passed
@1abhishekpandey 1abhishekpandey deleted the feature/sdk-290-configurable-collection-of-deviceid branch October 16, 2023 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants