Skip to content

Commit

Permalink
feat: use the oidc profile sub value which is what Terra does
Browse files Browse the repository at this point in the history
  • Loading branch information
rushtong committed Nov 15, 2024
1 parent cda0778 commit 8f3f267
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/ajax/Metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ const identify = async (anonId: String, signal: AbortSignal): Promise<any> => {

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 = {
Expand Down

0 comments on commit 8f3f267

Please sign in to comment.