-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Rubicon feature/s2s test module #1678
Rubicon feature/s2s test module #1678
Conversation
Here's a gist explaining this feature https://gist.github.com/bretg/64fe004e809d6d2ea646a158b530165b |
src/adaptermanager.js
Outdated
@@ -8,6 +8,7 @@ import { newBidder } from './adapters/bidderFactory'; | |||
var utils = require('./utils.js'); | |||
var CONSTANTS = require('./constants.json'); | |||
var events = require('./events'); | |||
var s2sTestingModule; // store s2sTesting module if it's loaded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer let
export const SERVER = 'server'; | ||
export const CLIENT = 'client'; | ||
|
||
var testing = false; // whether testing is turned on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we agreed to avoid global mutable state if possible. This could be refactored into an instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to refactor to use (getConfig('s2sConfig') || {}).testing
; each time, rather than storing this, but getConfig('s2sConfig') always returns undefined (will report the issue separately). So in the interest of getting this out in the next release (without spending more time right now), do you mind if we leave this for now?
modules/s2sTesting.js
Outdated
* @function getSource() gets a random source based on the given sourceWeights (export just for testing) | ||
* @param sourceWeights mapping of relative weights of potential sources. for example {server: 1, client: 3} should do a server request 25% of the time and a client request 75% of the time. | ||
* @param bidSources list of possible bid sources: "server", "client". In theory could get the sources from the sourceWeights keys, but this is publisher config defined, so bidSources let's us constrain that. | ||
* @param testRand a random number for testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not in params.
* tag '0.31.0' of https://github.com/prebid/Prebid.js: (54 commits) Fix for prebid#1628 (allowing standard bidCpmAdjustment) (prebid#1645) Prebid 0.31.0 Release Support native click tracking (prebid#1691) Initial commit for video support for pbs (prebid#1706) Fixes: Immediate adapter response may end auction (prebid#1690) Rubicon feature/s2s test module (prebid#1678) Renaming of "huddledmasses" adapter into colossusssp (prebid#1701) Don't set non-object configurations (prebid#1704) Update JSDoc for `pbjs.enableAnalytics` (prebid#1565) Add ad units event (prebid#1702) AppnexusAst adapter: logging error message from endpoint (prebid#1697) AppnexusAst bidadapter markdown file (prebid#1696) Change Default Content-Type for POST Requests to 'application/json' (prebid#1681) Code improvement for trustx adapter (prebid#1673) PulsePoint Lite adapter - Enabling Sync pixel (prebid#1686) Update spotx video adapter to set the spotx_ad_key used in DFP (prebid#1614) Fix broken AOL mobile endpoint secure bid requests (prebid#1684) Fix adapter tests that hardcoded pbjs. (prebid#1666) no longer attaching gpt slots to adUnits, which breaks utils.cloneJson(adUnit) (prebid#1676) remove bidmanager from rubicon tests (prebid#1671) ...
….31.0 to aolgithub-master * commit 'e7341c948014a789084849495171d08d4b353d07': (21 commits) Added changelog entry. Fix for prebid#1628 (allowing standard bidCpmAdjustment) (prebid#1645) Prebid 0.31.0 Release Support native click tracking (prebid#1691) Initial commit for video support for pbs (prebid#1706) Fixes: Immediate adapter response may end auction (prebid#1690) Rubicon feature/s2s test module (prebid#1678) Renaming of "huddledmasses" adapter into colossusssp (prebid#1701) Don't set non-object configurations (prebid#1704) Update JSDoc for `pbjs.enableAnalytics` (prebid#1565) Add ad units event (prebid#1702) AppnexusAst adapter: logging error message from endpoint (prebid#1697) AppnexusAst bidadapter markdown file (prebid#1696) Change Default Content-Type for POST Requests to 'application/json' (prebid#1681) Code improvement for trustx adapter (prebid#1673) PulsePoint Lite adapter - Enabling Sync pixel (prebid#1686) Update spotx video adapter to set the spotx_ad_key used in DFP (prebid#1614) Fix broken AOL mobile endpoint secure bid requests (prebid#1684) Fix adapter tests that hardcoded pbjs. (prebid#1666) no longer attaching gpt slots to adUnits, which breaks utils.cloneJson(adUnit) (prebid#1676) ...
* added new server-to-server testing module * fixed linting errors * s2sTesting module fixes * s2sTesting module fixes * removed "both" option from s2s ab testing module * removed leftover StorageManager reference * s2sTesting module improvements * s2sTesting module improvement * Revert "Merge branch 'bugfix/pbs-adapter-storagemanager' into rubicon-feature/s2s-test-module" This reverts commit be232c6, reversing changes made to 4a3abd7. * minor s2sTesting fixes
* added new server-to-server testing module * fixed linting errors * s2sTesting module fixes * s2sTesting module fixes * removed "both" option from s2s ab testing module * removed leftover StorageManager reference * s2sTesting module improvements * s2sTesting module improvement * Revert "Merge branch 'bugfix/pbs-adapter-storagemanager' into rubicon-feature/s2s-test-module" This reverts commit be232c6, reversing changes made to 4a3abd7. * minor s2sTesting fixes
module for doing a/b testing between server-to-server and client-to-server bid requests.
Type of change
Description of change
Be sure to test the integration with your adserver using the Hello World sample page.
Other information