From cf94110739e54e1783cc258339783e7e9f36a717 Mon Sep 17 00:00:00 2001 From: Platoscaves Date: Wed, 17 May 2023 19:42:18 +1000 Subject: [PATCH] Allow the payload to set the event id --- src/track.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/track.ts b/src/track.ts index 3c86f92..fdecb9a 100644 --- a/src/track.ts +++ b/src/track.ts @@ -23,7 +23,7 @@ const getBaseRequestBody = ( settings: ComponentSettings ) => { const { client, payload } = event - const eventId = String(Math.round(Math.random() * 100000000000000000)) + const eventId = payload.event_id || String(Math.round(Math.random() * 100000000000000000)) const body: { [k: string]: any } = { event: