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

bidderFactory sends wrong sync params to the bidders #1883

Closed
dmitriyshashkin opened this issue Nov 24, 2017 · 1 comment · Fixed by #1897
Closed

bidderFactory sends wrong sync params to the bidders #1883

dmitriyshashkin opened this issue Nov 24, 2017 · 1 comment · Fixed by #1897
Assignees

Comments

@dmitriyshashkin
Copy link
Contributor

Type of issue

Bug

Description

I tried to enable user sync through frames so I've added the following setConfig call:

pbjs.setConfig({ userSync: {
    iframeEnabled: true
}});

The "userSync" module combines default setting with those passed in setConfig. If the user hasn't specified some option, it would retain its default value.

config.getConfig('userSync', (conf) => {
    usConfig = Object.assign(usConfig, conf.userSync);
});

But the "bidderFactory" does not store the initial settings, instead, it asks the "config" for the current version of those settings.

let syncs = spec.getUserSyncs({
    iframeEnabled: config.getConfig('userSync.iframeEnabled'),
    pixelEnabled: config.getConfig('userSync.pixelEnabled'),
}, responses);

Config modules does not apply the default settings. And if the user hasn't specified some option, it would be undefined and undefined is treated as false. Upon the first call to "setConfig" the default values are discarded. In my case, pixelEnabled became undefined. So enabling iframe sync disabled pixel sync.

I'd say that the handling of the default values should be done in the config.

Steps to reproduce

  1. Add the following funtion call at the init pbjs.setConfig({ userSync: {iframeEnabled: true}});
  2. Run an auction with some bidders that use pixel sync (conversant, trustX)

Expected results

Sync pixels for those bidders are fired

Actual results

Sync pixels for those bidders are not fired

Platform details

pbjs v 0.33

@dmitriyshashkin dmitriyshashkin changed the title bidderFactory send wrong sync params to bidders bidderFactory sends wrong sync params to the bidders Nov 25, 2017
@mkendall07
Copy link
Member

@dmitriyshashkin
Thanks for reporting. Will take a look at this.

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

Successfully merging a pull request may close this issue.

3 participants