Traits payload is not attached to "track" events
blbnv opened this issue · comments
Describe the bug
Me and the team have identified the difference between iOS and Android SDK behaviours, when we added a custom value to the traits payload using identify(traits:) interface.
Then, during using Segment Debugger, I can see traits are attached to indentify event (expected), but they're not attached to any of other events - track, lifecycle.
Android SDK has pretty much the same integration code, but we can confirm the fact we see traits for every event that follows the identify one.
To Reproduce
Steps to reproduce the behavior:
- Launch the application with the valid Segment configuration
- Call
identify(userId: yourUserId, traits: ["customField": "value"]) - Call a few
trackevents after. - Open Segment Debugger and click on
identifyevent - you can seetraitsare attached to it - Open any
trackevent - There are no traits attached to any of them
Expected behavior
Every track events from the step three should have traits attached.
Screenshots
If applicable, add screenshots to help explain your problem.
Platform (please complete the following information):
- Library Version in use: 1.4.7
- Platform being tested: iOS
Additional context
- Maybe I am missing something from Android implementation, but I was not able to find it in documentation
- I tried to look at the changelog for the last iOS SDK version, but was not able to find a fix or any context related to the issue reproted.
If you're looking for context.traits on non-identify events, this was by design to match analytics.js. See /examples/other_plugins/InjectTraits for an example of how to replicate the analytics-ios behavior.