Skip to content

Commit dd4451f

Browse files
committed
Add signup source to signup event
1 parent e619934 commit dd4451f

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

freebuff/web/src/app/api/auth/[...nextauth]/auth-options.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ export const authOptions: NextAuthOptions = {
211211
...userData,
212212
userId: userData.id,
213213
logger,
214+
signupSource: 'freebuff',
214215
})
215216

216217
trackEvent({

packages/internal/src/loops/client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ export async function sendSignupEventToLoops(params: {
8686
email: string | null
8787
name: string | null
8888
logger: Logger
89+
signupSource?: 'codebuff' | 'freebuff'
8990
}): Promise<void> {
90-
const { userId, email, name, logger } = params
91+
const { userId, email, name, logger, signupSource } = params
9192

9293
if (!loopsClient) {
9394
logger.warn({ userId }, 'Loops SDK not initialized. Skipping signup event.')
@@ -108,6 +109,7 @@ export async function sendSignupEventToLoops(params: {
108109
userId,
109110
contactProperties: {
110111
firstName: name?.split(' ')[0] ?? '',
112+
signupSource: signupSource ?? 'codebuff',
111113
},
112114
})
113115

web/src/app/api/auth/[...nextauth]/auth-options.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ export const authOptions: NextAuthOptions = {
224224
...userData,
225225
userId: userData.id,
226226
logger,
227+
signupSource: 'codebuff',
227228
})
228229

229230
trackEvent({

0 commit comments

Comments
 (0)