Skip to content

Commit 7a5391e

Browse files
authored
Add keywords param to Sonobi prebid (#1660)
* Add keywords param to Sonobi prebid * Add changeset * Check if keywords exist to perform a split
1 parent 25f3376 commit 7a5391e

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

.changeset/large-emus-sin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@guardian/commercial': minor
3+
---
4+
5+
Add Keywords parameter to Sonobi prebid

src/lib/header-bidding/prebid-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export type PrebidSonobiParams = {
4747
dom_id: string;
4848
appNexusTargeting: string;
4949
pageViewId: string;
50+
keywords: string[];
5051
render?: string;
5152
};
5253

src/lib/header-bidding/prebid/bid-config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,9 @@ const sonobiBidder: (pageTargeting: PageTargeting) => PrebidBidder = (
349349
dom_id: slotId,
350350
appNexusTargeting: buildAppNexusTargeting(pageTargeting),
351351
pageViewId: window.guardian.ophan.pageViewId,
352+
keywords: window.guardian.config.page.keywords
353+
? window.guardian.config.page.keywords.split(',')
354+
: [],
352355
}),
353356
});
354357

0 commit comments

Comments
 (0)