Is there a way to access some sort of event identifier at the time an event is created?
I’m thinking of use cases (particularly on the front-end with the JS tracker) where we want to track that a click happened, but also pass a reference to the Snowplow event to a third-party API at the same time so we can later tie the two back together.
Or is the recommended approach to generate an id and include it as an explicit property (or context) of the Snowplow unstructured event? Is there any solution for structured events?
Event id is generating on a very last step before request to collector. There’s a ticket on GH to add a callback, where we can add a payload as an argument, you can weigh in with your issue if you want.
There’s a possible workaround though. Since 2.8 you can extractpageViewId which is a part of webpage context. You potentially can use pageViewId to join data later.
event_id would be great in a callback. If you’re sending to a third party I’d also recommend sending domain_userid as well which can be accessed easily via the getDomainUserId. This is additional piece of info is quite useful in circumstances where there may be duplicates of event_id.