Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/server/api/epicRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ export const buildEpicRouter = (
return {};
}

if (
targeting.pageId === 'info/privacy' ||
targeting.pageId === 'info/complaints-and-corrections' ||
targeting.pageId === 'about'
) {
return {};
}

const targetingMvtId = targeting.mvtId || 1;

const tests =
Expand Down
8 changes: 8 additions & 0 deletions src/server/tests/banners/bannerSelection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@ export const selectBannerTest = (
return null;
}

if (
targeting.pageId === 'info/privacy' ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's put this in a shared function since it's being used at least twice

targeting.pageId === 'info/complaints-and-corrections' ||
targeting.pageId === 'about'
) {
return null;
}

if (forcedTestVariant) {
return getForcedVariant(forcedTestVariant, tests);
}
Expand Down
1 change: 1 addition & 0 deletions src/shared/types/targeting/banner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export type BannerTargeting = {
isSignedIn: boolean;
hasConsented: boolean;
abandonedBasket?: AbandonedBasket;
pageId?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we do this for the gutter ask as well, just in case?

};

export type BannerPayload = {
Expand Down
1 change: 1 addition & 0 deletions src/shared/types/targeting/epic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export type EpicTargeting = {
url?: string;
browserId?: string; // Only present if the user has consented to browserId-based targeting
isSignedIn?: boolean;
pageId?: string;
};

export type EpicPayload = {
Expand Down