-
Notifications
You must be signed in to change notification settings - Fork 270
Description
In the following link, the possibility of specifying the optional fields 'adSizes' and 'sizeGroups' is indicated. In particular:
Each named ad size is also considered a size group, so you don't need to manually define singleton size groups; for example see the sizeGroup: 'size3' code above
However, we receive the following error when using named sizes in the interest group:
TypeError: Failed to execute 'joinAdInterestGroup' on 'Navigator': ads[2].sizeGroup 'size3' for AuctionAdInterestGroup with owner 'https://www.example-dsp.com' and name 'womens-running-shoes' The assigned size group does not exist in sizeGroups map.
This example gives error:
navigator.joinAdInterestGroup({
'owner': 'https://www.example-dsp.com',
'name': 'womens-running-shoes',
'lifetimeMs': 8000,
'priority': 0.0,
'priorityVector': {
'signal1': 2,
'signal2': -3.5,
},
'prioritySignalsOverrides': {
'signal1': 4.5,
'signal2': 0,
},
'enableBiddingSignalsPrioritization' : true,
'biddingLogicURL': "https://www.example-dsp.com/bidding_logic.js",
'trustedBiddingSignalsKeys': ['key1', 'key2'],
'ads': [{renderUrl: 'https://www.example-dsp.com/render', sizeGroup: 'group1'},
{renderUrl: 'https://www.example-dsp.com/render', sizeGroup: 'group2'},
{renderUrl: 'https://www.example-dsp.com/render', sizeGroup: 'size3'}],
'adSizes': {'size1': {width: 300, height: 250},
'size2': {width: 300, height: 600},
'size3': {width: 728, height: 90},
'size4': {width: 160, height: 600}},
'sizeGroups': {'group1': ['size1', 'size2', 'size3'],
'group2': ['size3', 'size4']},
'auctionServerRequestFlags': ['omit-ads'],
})
This, on the other hand, works correctly (there are only sizeGroup specified):
navigator.joinAdInterestGroup({
'owner': 'https://www.example-dsp.com',
'name': 'womens-running-shoes',
'lifetimeMs': 8000,
'priority': 0.0,
'priorityVector': {
'signal1': 2,
'signal2': -3.5,
},
'prioritySignalsOverrides': {
'signal1': 4.5,
'signal2': 0,
},
'enableBiddingSignalsPrioritization' : true,
'biddingLogicURL': "https://www.example-dsp.com/bidding_logic.js",
'trustedBiddingSignalsKeys': ['key1', 'key2'],
'ads': [{renderUrl: 'https://www.example-dsp.com/render', sizeGroup: 'group1'},
{renderUrl: 'https://www.example-dsp.com/render', sizeGroup: 'group2'},
{renderUrl: 'https://www.example-dsp.com/render', sizeGroup: 'group1'}],
'adSizes': {'size1': {width: 300, height: 250},
'size2': {width: 300, height: 600},
'size3': {width: 728, height: 90},
'size4': {width: 160, height: 600}},
'sizeGroups': {'group1': ['size1', 'size2', 'size3'],
'group2': ['size3', 'size4']},
'auctionServerRequestFlags': ['omit-ads'],
})
Can't we just specify named sizes in sizeGroup
field? Thank you in advance