Ad Config
Ad Config allows users to set a configuration on a Global, Per Section or Per Article basis.
This granularity has the following priority:
Article > Section > Global
To access Ad Config a user must have the permission:
create flowz_ad ad_config
Ad Config Form builder
The Ad Config admin panel, is built from a hard-coded JSON config.
todo: This should be moved into CMS config.
These config files can be found here:
/src/constants/adConfig/{client}.js
The Ad Config is divided into tabbed panels to separate options for different Article states, for example 'Desktop' and 'Mobile'
example JSON array for an Ad Config tab:
[
{ title: 'Top Banner', tile: 'top_banner' },
{ title: 'Gutter ads', tile: 'gtl/gtr' },
{ title: 'Skins', tile: 'skin' },
{ title: 'In-Gallery MPUs', tile: 'gallery_mpu', type: 'range', data: { start: 3, length: 8 } },
{ title: 'Gallery MPU - Sidebar', tile: 'gallery_mpu_sb' },
{ title: 'Video Ad', tile: 'hero_player' },
{ title: 'Partner Ads', tile: 'partner_ad' },
{ title: 'Live Blog MPUs', tile: 'blog_mpu', type: 'range', data: { start: 3, length: 8 } },
{ title: 'Outstream 1', tile: 'thirdparty01' },
{ title: 'Outstream 2', tile: 'thirdparty02' },
{ title: 'Rich Media', tile: 'thirdparty_05' },
{ title: 'Out of page', tile: 'out-of-page' },
{ title: 'Header Native Unit', tile: 'headerNative', type: 'partner' },
{ title: 'Mid Article Native Unit ', tile: 'midNative', type: 'partner' },
{ title: 'Affiliate Widget', tile: 'affiliate', type: 'partner' },
];
Ad config object anatomy:
Property | Type | Usage |
---|---|---|
title | string | Displayed title on the config panel |
tile | string | Name of property saved to the JSON config objet, should match frontend gpt tile if possible |
type | string | Type of form object to display |
The form supports the following types:
- switch (default)
- range
- partner
switch (default)
Displays a toggle switch defaulting to the off position
range
Displays a select with a number range and an empty value of 'none'. Range supports the addition properties:
Property | Type | Usage |
---|---|---|
start | number | The starting value to display |
length | number | The number of values to display |
step | number | The interval between displayed number |
defaults:
start = 1
length = 10
step = 1
eg:
start = 1, length = 10, step = 1 will output the following options:
none,1,2,3,4,5,6,7,8,9,10
start = 5, length = 5, step = 5 will output the following options:
none,5,10,15,20,25
partner
Displays a select with a list of available partner and an empty value of 'none'. This is currently only enabled for The Independent.
To enable for other clients please see function:
getAdPartners
in file
/src/components/ad/adConfig/AdConfigTab.js