diff --git a/src/index.ts b/src/index.ts index 40cc3c0..bab6e31 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,11 +13,10 @@ const sendEvent = async ( const requestBody = { event_source: payload.event_source || 'web', event_source_id: payload.properties.pixelCode || settings.pixelCode, + test_event_code: settings.testKey, data: { ...payload, - ...(settings.testKey && { - test_event_code: settings.testKey, - }), + ...(settings.testKey && {}), }, }