Origami Frontend Components & Services

Readme: o-ads

o-ads is not maintained by the Origami team. This means that the Origami team will not necessarily be able to help you with support requests. The people who maintain this component may be able to offer support, but it's not guaranteed.

This is an Origami module that enables advertising from Google's DFP Ad Server (part of Ad Manager), and provides customised demographic, behavioural (via Krux), and contextual (via Admantx) targeting.


For basic use, a DFP (DoubleClick for Publishers) account with Google is required.
Each targeting/tracking supplier will require their own configuration and setup.


Demos for all ads currently served across ft.com are available in the Origami Registry.


Includes detailed installation and set-up instructions, along with details about the module.

To build the documentation locally, from the docs directory, run:

bundle install
jekyll build

It will generate a _site directory where generated site will be compiled
You can then run the jekyll local server by executing jekyll serve.


Install & Demos


See the test documentation


You will need a GITHUB_TOKEN environment variable with access to the repository in your .env file
Get a github token with "repo" access and make it accessible as an environment variable.

Run npm run release (patch|minor|major|x.y.z) in master then follow the interactive steps.

This will bump version numbers in the source and commit them, push to github and create a new release.

The command uses release-it under the hood as well as genversion to automatically bump version numbers in the source.

Migration Guide

Upgrading to v13

This release removes integration with Krux for behavioural targeting.
The origami component o-permutive can be used for behavioural tracking instead.

Upgrading to v12

This release introduces the following changes:

  1. o-ads is now recording a performance mark for every event that it dispatches. The performance mark will have the same name as the event that originated it plus, in some cases, a suffix that helps determine the circumstances that triggered the event. This is all being used internally by o-ads to provide new metrics functionality.

    1. o-ads exposes a new setupMetrics method that simplifies obtaining performance metrics. setupMetrics accepts two parameters:
  1. Several custom events fired by o-ads have been renamed for different reasons. This is the list of events whose name has changed:
Old event name New event name
startInitialisation initialising
moatIVTcomplete IVTComplete
apiRequestsComplete adsAPIComplete
adServerLoadSuccess serverScriptLoaded
ready slotReady
render slotCanRender
gptDisplay slotGoRender
rendered slotRenderStart
complete slotExpand
adIframeLoaded slotRenderEnded

A guide can to the new names can also be found in this two diagrams:

Event renaming pt. 1

event renaming 1

Event renaming pt. 2

event renaming 2

Upgrading to v11

As of version 11, o-ads has been updated to use ES modules. Unfortunately, this means it is not backwards compatible with CJS modules and clients cannot require('o-ads') anymore.

Upgrading to v10

Upgrading to v9

  1. Provide a cookie with the name FTConsent and specify which consent the user has given as part of the value like this: behaviouraladsOnsite:on,programmaticadsOnsite:on
  2. Initialise o-ads with the disableConsentCookie option.

Upgrading to v8

active Origami v1
Switch component view

GitHub Repository

Install o-ads

If using the Build Service, add o-ads@^13.1.1 to your script and link tags.

If running a Manual Build, run npm install "o-ads@^13.1.1".

Help & Support

o-ads is not supported directly by the Origami team. We make no guarantees, but will help if we can. First try contacting its maintainers at:

Slack: #advertising-dev
Email: origami.advertising.technology@ft.com