[eric] analytics: add the 2 track_link_email sites I missed (sign-in + settings-save), matching haik/feat/ingest exactly

This commit is contained in:
ciregenz
2026-06-24 18:36:58 -07:00
committed by ciregenz
parent 301264d611
commit 9137a8c07f
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -76,6 +76,12 @@ def p_sync_identity_to_service(settings_obj) -> None:
p_identify(props)
except Exception as e:
logger.debug("identify sync failed: %s", e)
if email:
try:
from backend.apps.service.analytics import track_link_email
track_link_email(email)
except Exception as e:
logger.debug("analytics link_email sync failed: %s", e)
# ---------------------------------------------------------------------------
+3
View File
@@ -265,6 +265,9 @@ async def apply_settings_update(body: AppSettings, protect_fields: set[str] | No
id_props["referral_source"] = body.user_referral_source
if id_props:
p_identify(id_props)
if body.user_email:
from backend.apps.service.analytics import track_link_email
track_link_email(body.user_email)
await save_settings_async(body)