From d5715ed426d1a1a6efea5109e2a766e78094e613 Mon Sep 17 00:00:00 2001 From: lyric Date: Mon, 18 Aug 2025 16:28:59 -0700 Subject: [PATCH] fix: example showing pbjs.addAdUnits as variadic --- features/pbAdSlot.md | 47 +++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/features/pbAdSlot.md b/features/pbAdSlot.md index 51f36be49f..fe244c8626 100644 --- a/features/pbAdSlot.md +++ b/features/pbAdSlot.md @@ -113,31 +113,34 @@ In this example, the publisher utilizes the same 'slotname' in the page for mult - defineSlot('/1111/homepage', [[728,90]], 'div-j98s9u9usj987665da'); ```javascript -pbjs.addAdUnits({ - code: 'div-293rj893p9wje9we9fj', - ortb2Imp: { - ext: { - gpid: "/1111/homepage#300x250", - data: { - pbadslot: "/1111/homepage#300x250" +pbjs.addAdUnits([ + { + code: 'div-293rj893p9wje9we9fj', + ortb2Imp: { + ext: { + gpid: "/1111/homepage#300x250", + data: { + pbadslot: "/1111/homepage#300x250" + } } - } + }, + mediaTypes: ... + bids: ... }, - mediaTypes: ... - bids: ... -},{ - code: 'div-j98s9u9usj987665da', - ortb2Imp: { - ext: { - gpid: "/1111/homepage#728x90", - data: { - pbadslot: "/1111/homepage#728x90" + { + code: 'div-j98s9u9usj987665da', + ortb2Imp: { + ext: { + gpid: "/1111/homepage#728x90", + data: { + pbadslot: "/1111/homepage#728x90" + } } - } - }, - mediaTypes: ... - bids: ... -}); + }, + mediaTypes: ... + bids: ... + } +]); ``` ## Prebid Server