[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-23 22:35:15 -07:00
parent 3d5aa33a20
commit 0bebdff030
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -76,6 +76,12 @@ def _sync_identity_to_service(settings_obj) -> None:
_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
@@ -266,6 +266,9 @@ async def apply_settings_update(body: AppSettings, protect_fields: set[str] | No
id_props["referral_source"] = body.user_referral_source
if id_props:
_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)