We have other tracking libraries we use on our site that we wish to use the same messageId for the same event sent to different sources, for example:
User clicks button (Event A):
const messageId = generateMsgId() // 456
const event = 'Event A'
segment.track(event, {}, { messageId }) // sends Event A with messageId 456
anotherSDK.track(event, { messageId }) // sends Event A with messageId 456
Instead, this is the problem we're running into:
User clicks button (Event A):
const messageId = generateMsgId() // 456
const event = 'Event A'
const properties = ...
segment.track(event, properties, { messageId }) // sends Event A with different messageId `ajs-next-*`
anotherSDK.track(event, properties, { messageId }) // sends Event A with messageId 456
Is there not a way to override the messageId per event, so we can use our own format in order to aggregate the same event across different sources? I see no way to do it with this library, but in the docs it says we can and you can in your other libs:
Keep in mind that Segmentβs libraries all generate message_ids for each event payload, with the exception of the Segment HTTP API, which assigns each event a unique message_id when the message is ingested. You can override these default generated IDs and manually assign a message_id if necessary.
If there isn't a way in JS, I would propose Segment's JS lib allows it according to your docs.