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

Traits payload is not attached to "track" events #323

Closed
blbnv opened this issue Apr 3, 2024 · 1 comment
Closed

Traits payload is not attached to "track" events #323

blbnv opened this issue Apr 3, 2024 · 1 comment
Assignees
Labels

Comments

@blbnv
Copy link

blbnv commented Apr 3, 2024

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:

  1. Launch the application with the valid Segment configuration
  2. Call identify(userId: yourUserId, traits: ["customField": "value"])
  3. Call a few track events after.
  4. Open Segment Debugger and click on identify event - you can see traits are attached to it
  5. Open any track event
  6. 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.
@bsneed
Copy link
Contributor

bsneed commented Apr 3, 2024

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.

@bsneed bsneed closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants