From 8f3f267a60192123509ed063e4f83cffc6921d81 Mon Sep 17 00:00:00 2001 From: rushtong Date: Fri, 15 Nov 2024 11:24:14 -0500 Subject: [PATCH] feat: use the oidc profile sub value which is what Terra does --- src/libs/ajax/Metrics.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/ajax/Metrics.ts b/src/libs/ajax/Metrics.ts index 8e482df9b..a82b38e8b 100644 --- a/src/libs/ajax/Metrics.ts +++ b/src/libs/ajax/Metrics.ts @@ -97,12 +97,13 @@ const identify = async (anonId: String, signal: AbortSignal): Promise => { if (window.Appcues) { const user = Storage.getCurrentUser(); + const oidcSub = Storage.getOidcUser()?.profile?.sub || Storage.getAnonymousId(); const createDate = user.createDate ? user.createDate : new Date().getTime(); const appcuesProps = { dateJoined: createDate, app: 'DUOS' }; - window.Appcues.identify(`${Storage.getAnonymousId()}`, appcuesProps); + window.Appcues.identify(oidcSub, appcuesProps); } const config: AxiosRequestConfig = {