Skip to content

Commit

Permalink
Merge pull request #12362 from bbc/WSTEAMA-1572-remove-atuserid
Browse files Browse the repository at this point in the history
WSTEAMA-1572: Remove "hashedId" to match sign-in status
  • Loading branch information
alex-magana authored Feb 5, 2025
2 parents 3879215 + 7790665 commit e1237ca
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 12 additions & 0 deletions src/app/components/ATIAnalytics/atiUrl/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,11 @@ describe('Reverb', () => {
x18: 'isLocServeCookieSet',
},
};
const userParans = { isSignedIn: false };

expect(reverbAnalyticsModel.params.page).toEqual(pageParams);
expect(reverbAnalyticsModel.params.user).toEqual(userParans);

expect(reverbAnalyticsModel.eventDetails).toEqual({
eventName: 'pageView',
});
Expand Down Expand Up @@ -439,5 +442,14 @@ describe('Reverb', () => {
container: '1234',
});
});

it('should return the correct Reverb user object configuration', () => {
const reverbPageSectionViewEventModel =
buildReverbPageSectionEventModel(input);

expect(reverbPageSectionViewEventModel.params.user).toEqual({
isSignedIn: false,
});
});
});
});
2 changes: 0 additions & 2 deletions src/app/components/ATIAnalytics/atiUrl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ export const buildReverbAnalyticsModel = ({
},
},
user: {
hashedId: getAtUserId(),
isSignedIn: false,
},
},
Expand Down Expand Up @@ -529,7 +528,6 @@ export const buildReverbPageSectionEventModel = ({
},
},
user: {
hashedId: getAtUserId(),
isSignedIn: false,
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/app/lib/analyticsUtils/sendBeacon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const setReverbPageValues = async ({ pageVars, userVars }) => {
});

window.bbcuser = {
getHashedId: () => [userVars.hashedId],
getHashedId: () => null,
isSignedIn: () => Promise.resolve(userVars.isSignedIn),
};
};
Expand Down

0 comments on commit e1237ca

Please sign in to comment.