Skip to content

Commit

Permalink
better handle test event code
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-astra-via committed Jun 27, 2024
1 parent ce203fb commit 0dc2357
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 && {}),
},
}

Expand Down

0 comments on commit 0dc2357

Please sign in to comment.