If config.usePageZone
is set to true, oAds will retrieve the DFP ad unit from the Ads API response.
In the Ads API response, the DFP ad unit is specified as a 2-elements array datapoint called dfp.adUnit
. These 2 dfp.adUnit
values are concatenate and used as gpt.zone
, as follows.
gpt.zone = responseObj.dfp.adUnit.join('/');
When config.usePageZone
is set to false, then oAds will ignore the DFP ad unit returned by the Ads API. In this case the ad unit site/zone can be specified either declaratively or programmatically using one of the following methods.
Set the slot’s attribute data-o-ads-gpt-unit-name
.
Set option gpt.unitName
.
e.g.,
{
gpt: {
unitName: "5887/ft.com/money",
},
}
Or, set options gpt.site
and gpt.zone
.
e.g.,
{
gpt: {
network: “5887”,
site: “ft.com”,
zone: "money",
},
}
nAds is only used for Financial Times apps, so it always uses the page zone provided by the Ads API. The network datapoint is already populated accordingly.
Set options.dpf_site
and options.dfp_zone
.
e.g.,
{
options: {
site: "ft.com",
zone: "money",
},
}
An AdUnit is a couplet of values [site, zone]
and it is derived from data coming from 2 sources: DFP mappings and Facet Tags.
Ads API retrieves DFP mappings from the Bertha server https://bertha.ig.ft.com/view/publish/gss/1faPId85Ni1oouPtNHOa73RDjLS6QItWFuxhqmyZSCX0/dfp The Bertha server returns a list of records. Every record is identified by a concept ID and contains a name, site, zone as follows.
e.g., a record from DFP mapping
{
"id": "37b1e62e-93ff-4991-aa83-c1ec974d4802", // concept ID
"name": "Capital Markets",
"site": "markets",
"zone": "capital.markets"
}
Ads API also retrieves Facet Tags from the Facets API https://tag-facets-api.ft.com/annotations?tagged=
E.g., a record from the Facet API response { “count”: 484, “id”: “0667615f-499e-4fa6-8130-f3430450228d”, “url”: “https://www.ft.com/stream/0667615f-499e-4fa6-8130-f3430450228d”, “prefLabel”: “US trade”, “directType”: “http://www.ft.com/ontology/Topic” },
An AdUnit is a couplet of values [site, zone]
and it is calculated as follows.
Search the DFP mappings
– retrieved from Bertha server - by Concept ID. If found, get the site and zone.
Get the IDs of the Facets Tags
– previously retrieved from the Facets API - whose derivedType
- i.e., the last word from the directType
URL - is different from Genre. Look for each of these values into the DFP mappings list. Stop when one is found with both site and zone.