Feature request: Support for passing traits to analytics.track()
bradvogel opened this issue · 0 comments
bradvogel commented
My current understanding of Segment's API:
analytics.track()
supports passing properties associated with the event.analytics.identify()
supports passing traits that are associated with the user.- #1 and #2 above are two separate API calls and there is no ordering guarantee; that is, they'll won't be delivered to the destination in the same order they were called.
This is a problem because some destinations, such as Amplitude, will associate traits with events under-the-hood. So if the event was sent to the destination, Amplitude, before the traits, the traits won't be associated with that event and thus will be useless.
For this reason, Amplitude supports passing user traits along with API calls to create events here,. This essentially combines analytics.track()
and analytics.identify()
into a single, atomic API call to:
- Create a new event
- Associate properties with that event
- Update traits on the user that are queryable in Amplitude at the time of that event
Would it be possible to add the ability to pass traits
to analytics.track()
that will be forwarded to destinations that support it?