feat: made deviceId collection configurable and de-coupled anonymousid and deviceId #117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Made device id collection by the SDK configurable and also stopped using deviceId as anonymous Id
Added a new property
collectDeviceId
in theMobileConfig
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:context.device.id
will not be sent as part of the event payloadanonymousId
currently used by the SDK is equal toDEVICE_ID/IDFV
, it will changed to a UUID and this would be reflected atcontext.traits.anonymousId
and.anonymousId
Info: Till now, SDK would use
DEVICE_ID/IDFV
asanonymousId
by default, if the user is not overriding the default value by using theputAnonymousId
API.For the Customers who are not overriding the default value of
anonymousId
, which means when the value ofanonymousId
is equal toDEVICE_ID/IDFV
, upgrading to2.5.0
and setting propertycollectDeviceId
tofalse
would change theanonymousId
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 withtrue
the anonymousId would also be refreshed/reset with a new UUID.Type of change
Checklists
Development
Code review