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

PBjs Core : fix creation of per-bidder syncOptions #12615

Merged
merged 63 commits into from
Jan 8, 2025

Conversation

wojciech-bialy-wpm
Copy link
Contributor

Type of change

  • Bugfix

Description of change

This PR relates to issue #12613 and alters the way syncOptions are sent to bidder by registerSyncInner method.

Instead of checking filterConfig properties, ACTIVITY_SYNC_USER is checked for each bidder, and for both sync types (iframe and image). This are the same permissions that are later verified by the publicApi.registerSync method.

wojciech-bialy-wpm and others added 30 commits August 18, 2020 11:16
Update master branch of grupawp/Prebid.js
Update tests for sspBC adapter:
- change userSync test (due to tcf param appended in v4.6)
- add tests for onBidWon and onTimeout
Update master branch of grupawp/Prebid.js
Update remote repository
Update remote repository
Update remote repository
Update remote repository
Copy link
Collaborator

@dgirardi dgirardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

I pushed an updated version of this to https://github.com/prebid/Prebid.js/tree/fix-syncoptions, but I don't think I have the right permissions to update this PR. It fixes the failing tests (that incidentally, were already broken before this change) and adds some new cases for this bug.

let syncs = spec.getUserSyncs({
iframeEnabled: !!(filterConfig && (filterConfig.iframe || filterConfig.all)),
pixelEnabled: !!(filterConfig && (filterConfig.image || filterConfig.all)),
iframeEnabled: isActivityAllowed(ACTIVITY_SYNC_USER, activityParams(MODULE_TYPE_BIDDER, spec.code, { syncType: 'iframe' })),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would log a warning when denied, but the bidder is not necessarily trying to use the wrong type of sync - we are just telling them whether image or iframes are allowed. Internally the activity is checked using canBidderRegisterSync, which on its own does not generate warnings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HI @dgirardi - I'll update source branch (https://github.com/grupawp/Prebid.js/tree/fix-syncoptions) with Your changes

Copy link
Contributor Author

@wojciech-bialy-wpm wojciech-bialy-wpm Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaaand done - could You take a look?

EDIT:
I have also updated https://bdr.wpcdn.pl/tests/usersyncs/sspbc-6.10-mixed_sync_3.html
& https://bdr.wpcdn.pl/tests/usersyncs/sspbc-6.10-mixed_sync_4.html test with the new version of Prebid.js and as You've said - Activity control warnings that were being generated by registerSyncInner are now gone.

@patmmccann patmmccann changed the title Fix creation of per-bidder syncOptions Core: Fix creation of per-bidder syncOptions Jan 6, 2025
Update grupawp fork with changes made by @dgirardi
@ChrisHuie ChrisHuie changed the title Core: Fix creation of per-bidder syncOptions PBjs Core : fix creation of per-bidder syncOptions Jan 8, 2025
@ChrisHuie ChrisHuie merged commit 6790c78 into prebid:master Jan 8, 2025
6 checks passed
therevoltingx pushed a commit to InteractiveAdvertisingBureau/Prebid.js that referenced this pull request Jan 14, 2025
* Update tests for sspBC adapter

Update tests for sspBC adapter:
- change userSync test (due to tcf param appended in v4.6)
- add tests for onBidWon and onTimeout

* [sspbc-adapter] 5.3 updates: content-type for notifications

* [sspbc-adapter] pass CTA to native bid

* [sspbc-5.3] keep pbsize for detected adunits

* [maintenance] - remove old test for sspBc bid adaptor

* [sspbc-5.3] increment adaptor ver

* [sspbc-adapter] maintenance update to sspBCBidAdapter

* remove yarn.lock

* Delete package-lock.json

* remove package-lock.jsonfrom pull request

* [sspbc-adapter] send pageViewId in request

* [sspbc-adapter] update pageViewId test

* [sspbc-adapter] add viewabiility tracker to native ads

* [sspbc-adapter] add support for bid.admNative property

* [sspbc-adapter] ensure that placement id length is always 3 (improves matching response to request)

* [sspbc-adapter] read publisher id and custom ad label, then send them to banner creative

* [sspbc-adapter] adlabel and pubid are set as empty strings, if not present in bid response

* [sspbc-adapter] jstracker data fix

* [sspbc-adapter] jstracker data fix

* [sspbc-adapter] send tagid in notifications

* [sspbc-adapter] add gvlid to spec; prepare getUserSyncs for iframe + image sync

* update remote repo

* cleanup of grupawp/prebid master branch

* update sspBC adapter to v 5.9

* update tests for sspBC bid adapter

* [sspbc-adapter] add support for topicsFPD module

* [sspbc-adapter] change topic segment ids to int

* sspbc adapter -> update to v6

* bugfix proposal - using isActivityAllowed to build per-bidder syncOptions

* Fix preexisting tests

* Use canBidderRegisterSync

---------

Co-authored-by: Wojciech Biały <[email protected]>
Co-authored-by: decemberWP <[email protected]>
Co-authored-by: Demetrio Girardi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prebid incorrectly builds syncOptions, when the Publisher sets different permissions for different bidders
5 participants