Sitelet https://github.com/chaincodelabs/boss-challenge/commit/5aa6dabfca224332a3a8a84486f7a7d349893341
Skip to content

Commit 5aa6dab

Browse files
committed
add referral data to apply event
1 parent ef07b9f commit 5aa6dab

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

‎app/page.jsx‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -430,13 +430,11 @@ const BossChallengeLanding = () => {
430430
};
431431

432432
const trackApplyClick = (location) => {
433-
if (typeof window !== 'undefined' && window.umami) {
434-
window.umami.track('apply_click', {
435-
button_location: location,
436-
referrer: document.referrer || 'direct',
437-
utm_source: new URLSearchParams(window.location.search).get('utm_source') || 'none',
438-
});
439-
}
433+
if (typeof window !== 'undefined' && window.umami) {
434+
const referrer = document.referrer ? new URL(document.referrer).hostname : 'direct';
435+
window.umami.track(`apply_${location}_${referrer}`);
436+
}
437+
};
440438
};
441439

442440
return (

0 commit comments

Comments
 (0)