Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Step 1: Build Prebid.js with the User ID Module

Starting with v2.21.0 of Prebid.js, the ID5 Universal ID is available as part of the userId module, although we recommend using at least v3.26.0 as it contains several new features and improvements. When building Prebid.js, be sure to include both the userId and id5IdSystem modules, in addition to the other modules you normally include.

...

Code Block
languagejs
linenumberstrue
pbjs.setConfig({
    userSync: {
        userIds: [{
            name: "id5Id",
     
      params: {

               partner: 173,            // change to the Partner Number you received from ID5
				
        pd: "MT1iNTBjY..."       // optional, see below for a link to how to generate the `pd` string
   
        },
      storage: {
    storage: {   type: "html5",           //  type: "cookiehtml5", is the required storage  type
          name: "id5id.1st",       // create a cookie with this name
   // "id5id" is the required storage name
            expires: 90,             // cookiestorage lasts for 90 days
                refreshInSeconds: 8*3600 // refresh ID every 8 hours to ensure it's is fresh
  
         }
 
      }],
        auctionDelay: 50                 // allowing 50ms maximum auction delay, applies to all userId modules
  }
});


Info
titleATTENTION

As of Prebid.js v4.13.0, ID5 requires storage.type to be "html5" and storage.name to be "id5id". Using other values will display a warning today, but in an upcoming release, it will prevent the ID5 module from loading. This change is to ensure the ID5 module in Prebid.js interoperates properly with the ID5 API and to reduce the size of publishers' first-party cookies that are sent to their web servers. If you have any questions, please reach out to us at prebid@id5.io.

Generating the Publisher Data (pd) String

...