Skip to content

Commit 1a013b0

Browse files
committed
fix request level timestamp_micros not being sent as number
1 parent 5cee808 commit 1a013b0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/ga4/EventBuilder/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export type EventPayload = {
147147
parameters: Parameter[]
148148
items: Parameter[][] | undefined
149149
userProperties: Parameter[]
150-
timestamp_micros: string | undefined
150+
timestamp_micros: number | undefined
151151
non_personalized_ads: boolean | undefined
152152
clientIds: ClientIds
153153
instanceId: InstanceId
@@ -648,7 +648,7 @@ const EventBuilder: React.FC = () => {
648648
parameters,
649649
eventName,
650650
userProperties,
651-
timestamp_micros,
651+
timestamp_micros: (num => isNaN(num) ? undefined : num)(parseFloat(timestamp_micros || '')),
652652
non_personalized_ads,
653653
useTextBox,
654654
payloadObj,

0 commit comments

Comments
 (0)