[web] track email notification sent and email link clicked (#32715)

* emit email-notification-sent event
* use UTM tags to track email link clicks
* do not include utm_id on session at registration

GitOrigin-RevId: 24091bf8923fa11b8ba5ebfc63a0cea5c0f9f40c
This commit is contained in:
Kristina
2026-04-16 08:05:40 +00:00
committed by Copybot
parent 21ea6ab989
commit a1ddb69247
2 changed files with 5 additions and 1 deletions
@@ -75,7 +75,7 @@ function addUserProperties(userId, session) {
}
if (session.inbound.utm) {
for (const utmKey of RequestHelper.UTM_KEYS) {
for (const utmKey of RequestHelper.REGISTRATION_UTM_KEYS) {
if (session.inbound.utm[utmKey]) {
AnalyticsManager.setUserPropertyForUserInBackground(
userId,
@@ -8,6 +8,7 @@ const UTM_KEYS = [
'utm_content',
'utm_medium',
'utm_count',
'utm_id',
]
function parseUtm(query) {
@@ -49,8 +50,11 @@ function parseReferrer(referrer, url) {
return referrerValues
}
const REGISTRATION_UTM_KEYS = UTM_KEYS.filter(k => k !== 'utm_id')
export default {
UTM_KEYS,
REGISTRATION_UTM_KEYS,
parseUtm,
parseReferrer,
}