Build Prebid From Source to Include The Lotame Panorama User ID Module
Building the prebid.js library with your choice of adaptors and modules is the best option for publishers looking to have the most direct control over the code running on their sites for performance optimization, unit testing and customization.
For engineering teams who want to inspect any Prebid.org approved code, including the modules and adaptors, their github repository is public. The git repo also includes complete instructions for building your own library.
ReadMe available directly at https://github.com/prebid/Prebid.js/blob/master/README.md
(Details subject to change)
The instructions for using this documented approach to build your very own copy of prebid.js update regularly with version changes of the tools but at a high level the process requires the following tool chain:
- git—To clone and access the repo.
- NPM—The node package manager
- gulp—The task runner used in the build process to automate the package management, run tests
Instructions for including the Lotame Panorama ID User ID module
Full details of available modules and their functionality are available here
The instructions for teams building prebid with the Lotame Panorama ID are listed here:
The build instructions provide the gulp task runner instructions to include the necessary Lotame Panorama ID User ID code.
gulp build –modules=lotamePanoramaIdSystem
The Lotame User ID module code is available for review at the Prebid github repo here:
At time of writing the module is 360 lines and 9.27 KB in size. Details subject to change.
Alternative Directly Managed Solutions
Prebid also provides an on demand, web based custom build tool. This service manages the build process server side for you.
Simply check the boxes as the features that you’d like to include and you can download a functional version of the prebid.js to the latest version.
This is a useful tool that allows you to quickly test older versions of Prebid, current version at time of writing is 6.2.0, or the implications of using specific modules and adaptors together in testing conditions.
Use of the dynamically generated prebid.js library in production environments is at the discretion of the publisher.
Configuring the Lotame Panorama User ID Module
Once the Lotame Panorama ID User ID module has been added to the prebid.js library you need to add the configuration in the client side code that defines how the prebid module is used in the page.
The client side markup for this configuration can be found on the Prebid.org website at:
The client side code is:
Without this the prebid.js library won’t use the Lotame User ID module that it was built with.
Here is a test page that has both built the prebid.js library with the Lotame User ID module and added the setConfig() JSON settings.
You can see in the source of the page the userSync object in the setConfig() method is called after the pbjs object is initialized.
In order to return the Panorama ID on your browser, refer to the How to Test the Lotame Panorama User ID Module article to test the implementation with the call to:
The Lotame Panorama ID User ID Module for Prebid—Overview
What is Prebid and the User ID modules
How to implement the Lotame User ID modules in Pubmatic
How to implement the Lotame User ID modules in Magnite
How to Implement the Lotame User ID Module in Smart AdServer
How to Test for the Lotame Panorama ID User ID Module in Prebid