Skip to content

Commit

Permalink
Merge pull request #5 from tgowing/patch-1
Browse files Browse the repository at this point in the history
Add ttp param in the USER_DATA
  • Loading branch information
simonabadoiu authored Aug 11, 2023
2 parents ea10c42 + ba5150b commit 1a5d8d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const USER_DATA: Record<string, { hashed?: boolean }> = {
email: { hashed: true },
phone_number: { hashed: true },
external_id: { hashed: true },
ttp: { hashed: false }

Check failure on line 7 in src/track.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Insert `,`
}

const getTtclid = (event: MCEvent) => {
Expand Down Expand Up @@ -79,6 +80,11 @@ export const getRequestBody = async (
delete payload[key]
}
}

Check failure on line 83 in src/track.ts

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Delete `··`
const ttpFromCookie = event.client.get('_ttp')
if (!body.context.user.ttp && ttpFromCookie) {
body.context.user.ttp = ttpFromCookie
}

if (ttclid) {
body.context.ad = {
Expand Down

0 comments on commit 1a5d8d0

Please sign in to comment.