mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-07 02:07:45 +02:00
[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:
@@ -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)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user