Skip to content

Commit 31113e5

Browse files
committed
added reason for already attributed case
1 parent 9641389 commit 31113e5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

apps/sim/app/api/attribution/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ export async function POST() {
207207
return NextResponse.json({
208208
attributed,
209209
bonusAmount: attributed ? bonusAmount : undefined,
210+
reason: attributed ? undefined : 'already_attributed',
210211
})
211212
} catch (error) {
212213
logger.error('Attribution error', { error })

apps/sim/hooks/use-referral-attribution.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const TERMINAL_REASONS = new Set([
1212
'invalid_cookie',
1313
'no_utm_cookie',
1414
'no_matching_campaign',
15+
'already_attributed',
1516
])
1617

1718
/**

0 commit comments

Comments
 (0)