Skip to content

Commit 781cb59

Browse files
author
Juarez Mota
committed
fix: add force banner and force braze message URL parameters to StickyBottomBanner
1 parent 21c5300 commit 781cb59

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

dotcom-rendering/src/components/StickyBottomBanner.importable.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,24 @@ export const StickyBottomBanner = ({
343343
host,
344344
);
345345

346+
const hasForceBannerParam =
347+
window.location.search.includes('force-banner');
348+
const hasForceBrazeMessageParam = window.location.hash.includes(
349+
'force-braze-message',
350+
);
351+
352+
let candidates: SlotConfig['candidates'];
353+
354+
if (hasForceBannerParam) {
355+
candidates = [CMP, readerRevenue];
356+
} else if (hasForceBrazeMessageParam) {
357+
candidates = [CMP, brazeBanner];
358+
} else {
359+
candidates = [CMP, signInGate, brazeBanner, readerRevenue];
360+
}
361+
346362
const bannerConfig: SlotConfig = {
347-
candidates: [CMP, signInGate, brazeBanner, readerRevenue],
363+
candidates,
348364
name: 'banner',
349365
};
350366

0 commit comments

Comments
 (0)