Skip to content

Conversation

oscb
Copy link
Contributor

@oscb oscb commented Jun 28, 2022

  • Reverted the traits behavior to not persist after an identify event
  • Added example plugin InjectTraits and documentation for how to preserve this behavior
  • Added migration guide for Plugins from V1 to V2

- Reverted the traits behavior to not persist after an `identify` event
- Added example plugin `InjectTraits` and documentation for how to preserve this behavior
- Added migration guide for Plugins from V1 to V2
### Context Traits
Previous versions of this library used to persist `traits` accross events after an `identify` was sent inside `context.traits` we're not supporting this out of the box in V2 and the rest of our mobile libraries due concerns of data privacy for some device destinations. Some device mode destinations might not accept events if they contain identifiable data.
Copy link
Contributor

Choose a reason for hiding this comment

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

Previous versions of this library used to persist traits in context.traits across all event types after an identify event was sent. We no longer not support this out of the box in V2 as well as the rest of our mobile libraries due to concerns of data privacy for some device mode destinations. Some device mode destinations might not accept events if they contain identifiable data as it is against their Terms of Service.

segmentClient.add({ plugin: new InjectTraits() });
```
Please note that as this is an example we don't offer full support for it nor release it as an npm package.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please note that as this is an example we don't offer full support for it and will not release it as an NPM package.

@oscb oscb merged commit 516aacd into master Jun 30, 2022
@oscb oscb deleted the user/oscb/revertTraits branch June 30, 2022 17:03
oscb pushed a commit that referenced this pull request Jun 30, 2022
## [@segment/analytics-react-native-v2.3.2](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.3.1...@segment/analytics-react-native-v2.3.2) (2022-06-30)

### Features

* Add AdvertisingId Plugin ([#574](#574)) ([9f47e67](9f47e67))

### Bug Fixes

* revert traits behavior ([#588](#588)) ([516aacd](516aacd))
@oscb
Copy link
Contributor Author

oscb commented Jun 30, 2022

🎉 This PR is included in version @segment/analytics-react-native-v2.3.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@oscb oscb added the released label Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants