Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 89f0679 Feb 25, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update issue templates Oct 30, 2018
dist Prebid Universal Creative 1.3.0 Release Feb 25, 2019
resources Adding cookieSync module and build task Feb 23, 2018
src Replace native placeholders with asset values (#56) Feb 25, 2019
template/amp update CDN reference and add RELEASE process document Sep 21, 2018
test Replace native placeholders with asset values (#56) Feb 25, 2019
testpages Adding a query param to limit the /cookie_sync pixel count (#45) Dec 13, 2018
.babelrc Unit test and test setup Sep 24, 2018
.gitignore Unit test and test setup Sep 24, 2018
LICENSE Initial commit Feb 2, 2018 E2E testing (#38) Oct 15, 2018 add missing link to circleci in Release Process (#42) Nov 5, 2018
browsers.json E2E testing (#38) Oct 15, 2018
gulpfile.js Replace native placeholders with asset values (#56) Feb 25, 2019
karma.conf.maker.js add mocha reporter as base and keep coverage for testcoverage task Sep 27, 2018
package-lock.json Prebid Universal Creative 1.3.0 Release Feb 25, 2019
package.json increment pre version Feb 25, 2019
wdio.conf.js E2E testing (#38) Oct 15, 2018
webpack.conf.js updates to support renaming pbjs in universal creative (#53) Feb 12, 2019

Prebid Universal Creative

Prebid Universal Creative is a javascript api to render multiple formats. This file is inserted into the prebid creative as a placeholder for the winning prebid creative. It should support the following formats:

  • Banner
  • Outstream Video
  • Mobile (Coming Soon)
  • AMP creatives
  • All safeFrame creatives


$ git clone
$ cd prebid-universal-creative
$ npm install

Build for development

$ gulp serve

Starts a web server at http://localhost:9999 serving from the project root and generates the following files:

  • ./build/creative.js - Full source code for dev and debug
  • ./build/ - Source map for dev and debug

Build for production

We publish prebid-universal-creative as npm package on

When we run npm publish, prepublish script of package.json is executed. Scripts given in prepublish Run BEFORE the package is packed and published. See

gulp build is executed before publish. It creates two files in dist directory

  • ./dist/creative.js - Minified creative.js source code
  • ./dist/creative.max.js - Unminified source code to help in debugging.

jsDelivr – Open Source CDN is used to serve creative.js file.


We like to test a lot before releasing newer versions.

gulp test // Run unit tests in your local environment

Set the environment variables. You may want to add these to your ~/.bashrc for convenience.

export BROWSERSTACK_USERNAME="my browserstack username"
export BROWSERSTACK_ACCESS_KEY="my browserstack access key"
gulp test --browserstack

For End to End testing,

gulp test --e2e --https

Reason to add specific host to your host file is

  • To test against your local build, we had to give local path in dfp creative. Redirecting request is not possible in browserstack.
  • On localhost domain you do not receive bid from certain SSP's, hence you have to have some host defined in hosts file. As of now we are using test.localhost defined in local host file as well as DFP creative.


Found a bug? Great! This project is in its infancy, and many things can be improved.

Report bugs, request features, and suggest improvements on Github.

Or better yet, open a pull request with the changes you'd like to see.

You can’t perform that action at this time.