diff --git a/src/app/components/ATIAnalytics/atiUrl/index.test.ts b/src/app/components/ATIAnalytics/atiUrl/index.test.ts index 7f9ad991e74..f782af45a9f 100644 --- a/src/app/components/ATIAnalytics/atiUrl/index.test.ts +++ b/src/app/components/ATIAnalytics/atiUrl/index.test.ts @@ -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', }); @@ -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, + }); + }); }); }); diff --git a/src/app/components/ATIAnalytics/atiUrl/index.ts b/src/app/components/ATIAnalytics/atiUrl/index.ts index 6b1256eb5a4..9b40df85e19 100644 --- a/src/app/components/ATIAnalytics/atiUrl/index.ts +++ b/src/app/components/ATIAnalytics/atiUrl/index.ts @@ -479,7 +479,6 @@ export const buildReverbAnalyticsModel = ({ }, }, user: { - hashedId: getAtUserId(), isSignedIn: false, }, }, @@ -529,7 +528,6 @@ export const buildReverbPageSectionEventModel = ({ }, }, user: { - hashedId: getAtUserId(), isSignedIn: false, }, }, diff --git a/src/app/lib/analyticsUtils/sendBeacon/index.js b/src/app/lib/analyticsUtils/sendBeacon/index.js index 3fafd914294..a8078dfbfd2 100644 --- a/src/app/lib/analyticsUtils/sendBeacon/index.js +++ b/src/app/lib/analyticsUtils/sendBeacon/index.js @@ -47,7 +47,7 @@ const setReverbPageValues = async ({ pageVars, userVars }) => { }); window.bbcuser = { - getHashedId: () => [userVars.hashedId], + getHashedId: () => null, isSignedIn: () => Promise.resolve(userVars.isSignedIn), }; };