Skip to content

Commit 885c652

Browse files
committed
Add email to meta event
1 parent ef529dd commit 885c652

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

src/CONST/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8578,16 +8578,19 @@ const CONST = {
85788578
EVENT: {
85798579
SIGN_UP: {
85808580
NAME: 'sign_up',
8581+
META: 'SignUp',
85818582
REDDIT: 'SignUp',
85828583
LINKEDIN: 507587661,
85838584
},
85848585
WORKSPACE_CREATED: {
85858586
NAME: 'workspace_created',
8587+
META: 'WorkspaceCreated',
85868588
REDDIT: 'Lead',
85878589
LINKEDIN: 25474804,
85888590
},
85898591
PAID_ADOPTION: {
85908592
NAME: 'paid_adoption',
8593+
META: 'PaidAdoption',
85918594
REDDIT: 'Purchase',
85928595
LINKEDIN: 25474820,
85938596
},

src/libs/GoogleTagManager/index.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,11 @@ function publishEvent(event: GoogleTagManagerEvent, accountID: number, email: st
4444
return;
4545
}
4646

47-
// Events in Meta & Reddit are currently being set in CamelCase from OldDot
48-
const pixelEventName = event
49-
.split('_')
50-
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
51-
.join('');
52-
5347
const eventID = `${accountID}-${event}`;
5448

5549
// Meta
5650
if (typeof window.fbq === 'function') {
57-
window.fbq('trackCustom', pixelEventName, undefined, {eventID});
51+
window.fbq('trackCustom', pixelEvent.META, {em: email}, {eventID});
5852
}
5953

6054
// Reddit

0 commit comments

Comments
 (0)