Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time


Module Name: Adloox Analytics Adapter
Module Type: Analytics Adapter


Analytics adapter for Contact for information.

This module can be used to track:

  • Display
  • Native
  • Video (see below for further instructions)

The adapter adds an HTML <script> tag to load Adloox's post-buy verification JavaScript ( at ~25kiB gzipped) when the bidWon event is fired for each ad slot.


When tracking video you have two options:

  • Instream Video Ads Tracking
    • only suitable for instream video bids
    • VAST events are not collected by Adloox
    • viewability metrics are not MRC accredited
  • Adloox Ad Server Video
    • works by by wrapping the Ad Server VAST URL
    • viewability metrics are MRC accredited for IAB VPAID and OM SDK enable inventory
    • compatible for use alongside the Instream Video Ads Tracking module though not required in order to function
    • slightly more complicated though straight forward to implement


To view an example of an Adloox integration:

gulp serve --nolint --notest --modules=gptPreAuction,categoryTranslation,dfpAdServerVideo,intersectionRtdProvider,rtdModule,instreamTracking,rubiconBidAdapter,spotxBidAdapter,adlooxAnalyticsAdapter,adlooxAdServerVideo,adlooxRtdProvider

N.B. categoryTranslation is required by dfpAdServerVideo that otherwise causes a JavaScript console warning

N.B. intersectionRtdProvider is used by adlooxRtdProvider to provide (above-the-fold) ATF measurement, if not enabled the atf segment will not be available

Now point your browser at: http://localhost:9999/integrationExamples/gpt/adloox.html?pbjs_debug=true

Public Example

The example is published publicly at:

N.B. this will show a CORS error for the request that is safe to ignore on the public example page; it is related to the RTD integration which requires pre-registration of your sites

It is recommended you use Google Chrome's 'Local Overrides' located in the Developer Tools panel to explore the example without the inconvenience of having to run your own web server.

Pre-built prebid.js

If you are unable to build code on your system, then you may wish to experiment with a full (all modules enabled) version of the prebid.js script with the above three Adloox modules included published at:

You should be able to use this during the QA process of your own internal testing sites.

N.B. do not use this link or the code at it in production


The main Prebid.js documentation is a bit opaque on this but you can use the following to test only Adloox's modules:

gulp lint
gulp test-coverage --file 'test/spec/modules/adloox{AnalyticsAdapter,AdServerVideo,RtdProvider}_spec.js'
gulp view-coverage


  provider: 'adloox',
  options: {
    //toselector: function(bid) { return '#' + bid.adUnitCode },
    client: 'adlooxtest',
    clientid: 127,
    platformid: 0,
    tagid: 0

The options client, clientid, platformid and tagid are supplied by Adloox to you and must be provided in the configuration.

toselector Option

For non-GPT integrations, the module expects the value of adUnitCode from the bid object to match the div ID of the unit to facilitate measurements made against it.

N.B. for GPT integrations the div ID is automatically discovered and you should not use this option

When not true for your environment (you will see a warning stating 'unable to find ad unit code') you should provide a function through the option toselector that when passed the bid object it returns the selector for the slot; internally the module will pass this value to document.querySelector() to obtain the actual slot.

By example, the default handler used for options.toselector when not supplied is shown above though internally some basic escaping is applied but omitted here for reasons of clarity; your own handler will need to provide its own escaping where necessary.


The Adloox 'Impression JavaScript Tag Integration Guidelines' provide details on parameters (for the params block) you can pass that configure the Adloox verification JavaScript for your inventory.

For example, you have a number of reporting breakdown slots available in the form of id{1->10} that are configurable with:

  provider: 'adloox',
  options: {
    client: 'adlooxtest',
    clientid: 127,
    platformid: 0,
    tagid: 0,
    params: {
      id1: function(b) { return b.adUnitCode },  // do not change when using the Adloox RTD Provider
      id2: '%%gpid%%',                           // do not change when using the Adloox RTD Provider
      id3: function(b) { return b.bidder },
      id4: function(b) { return b.adId },
      id5: function(b) { return b.dealId },
      id6: function(b) { return b.creativeId },
      id7: function(b) { return b.size },
      id11: '$ADLOOX_WEBSITE'                    // do not change, Adloox internal use only

N.B. params shown above is the default and may be omitted altogether if you wish to make no changes

N.B. values that return false, null, or undefined are not sent whilst values of true return just the key


The following macros are available


You may also supply a function to dynamically generate the value of the parameter from the bid response; the function is passed a single argument that corresponds to the BidResponse object seen at the bidWon event.

You can look to the default params section above for examples of how to use this.

If your function throws an exception, it will be caught and the value set (and observable in Adloox's reporting) to:

ERROR: <Error>

Where <Error> is the value from Error.prototype.message.


Some parameters, such as px_imp and bridge, can take multiple values and can be described by providing an array:

params: {
  px_imp: [
    function(b){ return '' + b.bidder + '/pixel.jpg' }