Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sizeMapping.js content is missing from build if you don't explicitly build with sizeMapping #10936

Closed
redemption opened this issue Jan 12, 2024 · 0 comments · Fixed by prebid/prebid.github.io#5082
Assignees

Comments

@redemption
Copy link

Type of issue

I think this is a bug.

Description

The Prebid.js 8.0 Bidder Interface and Publisher API Changes doc mentions that Size Mapping has been moved out of Core and into sizeMappinV2. It links to [this issue here](sizeMapping V1).

I believe the docs are basically meaning to use the sizeMappingV2 module, which is also found in the Prebid.js downloads page as "Advanced Size Mapping".

The problem is, if you use gulp to build Prebid.js 8.30.0 or 8.31.0, or if you use the download page to download Prebid.js 8.30.0 or 8.31.0, whether you add "Advanced Size Mapping" or not the code to handle sizeConfig does not exist in the final prebid.js file.

And as a result, any responsive ads that rely on global pbjs.setConfig({sizeConfig: {}}) doesn't seem to work.

Steps to reproduce

  1. Set up ad units without sizeConfig.
  2. setConfig should have a sizeConfig, like this: sizeConfig: [{ 'mediaQuery': '(min-width: 767px)', 'sizesSupported': [ [728, 90], [300, 250] ], 'labels': ['300-desktop'] }, { 'mediaQuery': '(min-width: 757px) and (max-width: 766px)', 'sizesSupported': [ [728, 90], [300, 250] ], 'labels': ['300-mobile'] }, { 'mediaQuery': '(min-width: 480px) and (max-width: 756px)', 'sizesSupported': [ [468, 60], [300, 250] ], 'labels': ['tablet'] }, { 'mediaQuery': '(min-width: 0px) and (max-width: 479px)', 'sizesSupported': [ [300, 250], [320, 50] ], 'labels': ['phone'] }]
  3. enable debug of Prebid
  4. The ad units will not respect sizeConfig. To confirm this you can look for the missing "Size mapping filtered" console output. You can also confirm by using the Chrome Professor Prebid extension to look at AdUnits and you can see that there will be bids for sizes that should have been filtered out by Prebid.js.

The moment I added sizeMapping to the list of modules to build the global sizeConfig starts working. That also happens if I build the entire package of modules.

Test page

Expected results

Actual results

Platform details

Other information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants