mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-22 08:38:13 +02:00
chore: fix phantom user creation in posthog
This commit is contained in:
parent
a67c984e1a
commit
c554256db1
2 changed files with 36 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ from posthog import Posthog
|
|||
from api.constants import POSTHOG_API_KEY, POSTHOG_HOST
|
||||
|
||||
_posthog_client: Posthog | None = None
|
||||
POSTHOG_SERVER_GROUP_IDENTIFY_DISTINCT_ID = "server-group-identify"
|
||||
|
||||
|
||||
def get_posthog() -> Posthog | None:
|
||||
|
|
@ -77,7 +78,7 @@ def group_identify(
|
|||
group_type,
|
||||
group_key,
|
||||
properties,
|
||||
distinct_id=distinct_id,
|
||||
distinct_id=distinct_id or POSTHOG_SERVER_GROUP_IDENTIFY_DISTINCT_ID,
|
||||
)
|
||||
except Exception:
|
||||
logger.exception("Failed to identify PostHog group")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue