Get Config
The getConfig function is for retrieving the current configuration object or subscribing to configuration updates. When called with no parameters, the entire config object is returned. When called with a string parameter, a single configuration property matching that parameter is returned.
pbjs.getConfig()
When called with a string parameter, a single configuration property matching that parameter is returned.
pbjs.getConfig('debug')
The getConfig function also contains a subscribe ability that adds a callback function to a set of listeners that are invoked whenever setConfig is called. The subscribed function will be passed the options object that was used in the setConfig call. Individual topics can be subscribed to by passing a string as the first parameter and a callback function as the second.
getConfig((config) => console.log('config set:', config));
Subscribe to only logging changes
getConfig('logging', (config) => console.log('logging set:', config));
Unsubscribe
					
const unsubscribe = getConfig(...);
unsubscribe(); // no longer listening
					
				
Arguments:
  • debug: boolean

    Boolean to indicate if debugging is turned on or off.

    Accepted Values
    Parm Description
    Fixed
    Random There is no order to the bidders. This is the default setting.
Response
Response Description
{ response: example }
  • param1: string

    String indicating some value that has to be passed as a string type.

  • param2: number

    Number indicating some value that has to be passed as a number type.

    Note: This number should be between 0 and infinity.