Skip to content

Commit

Permalink
fix prettier errors
Browse files Browse the repository at this point in the history
  • Loading branch information
simonabadoiu committed Aug 14, 2023
1 parent 3d718c3 commit 276707b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const USER_DATA: Record<string, { hashed?: boolean }> = {
email: { hashed: true },
phone_number: { hashed: true },
external_id: { hashed: true },
ttp: { hashed: false }
ttp: { hashed: false },
}

const getTtclid = (event: MCEvent) => {
Expand All @@ -24,7 +24,8 @@ const getBaseRequestBody = (
settings: ComponentSettings
) => {
const { client, payload } = event
const eventId = payload.event_id || String(Math.round(Math.random() * 100000000000000000))
const eventId =
payload.event_id || String(Math.round(Math.random() * 100000000000000000))

const body: { [k: string]: any } = {

Check warning on line 30 in src/track.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Unexpected any. Specify a different type
event:
Expand Down Expand Up @@ -80,7 +81,7 @@ export const getRequestBody = async (
delete payload[key]
}
}

const ttpFromCookie = event.client.get('_ttp')
if (!body.context.user.ttp && ttpFromCookie) {
body.context.user.ttp = ttpFromCookie
Expand Down

0 comments on commit 276707b

Please sign in to comment.