From 4abedf0c641a743ccb6213227b95d02fb587b3fe Mon Sep 17 00:00:00 2001 From: Barak Gila Date: Mon, 26 Sep 2022 14:02:28 -0700 Subject: [PATCH] add identify --- web/lib/service/analytics.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/lib/service/analytics.ts b/web/lib/service/analytics.ts index 16efef8d..df3338f0 100644 --- a/web/lib/service/analytics.ts +++ b/web/lib/service/analytics.ts @@ -64,10 +64,14 @@ export const withTracking = export async function identifyUser(userId: string) { setUserId(userId) + // @ts-expect-error Sprig doesn't yet have a native typescript snippet + window.Sprig.setUserId(userId) } export async function setUserProperty(property: string, value: string) { const identifyObj = new Identify() identifyObj.set(property, value) await identify(identifyObj) + // @ts-expect-error Sprig doesn't yet have a native typescript snippet + window.Sprig.setAttribute(property, value) }