这是indexloc提供的服务,不要输入任何密码
Skip to content

sizeGroup error on joinAdInterestGroup #970

@onetag-dev

Description

@onetag-dev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions