Cloudflare

Base Technical Requirements

Thanks to a partnership with Cloudflare, AIDEM SSP can be natively activated to deliver server-side ads only to users running adblocking software using a Cloudflare Worker.

The server-side Ads appear as images or video directly served from the publisher domain, with no cookies, ID, or fingerprint used for targeting or measurement.

The Cloudflare integration require five steps.

  1. Bypass static assets: AIDEM SSP does not need to process static resources. To bypass all paths serving static assest (e.g, /wp-content/ or /wp-includes/) you can create a new route in the Workers tab of the dashboard matching *example.com/wp-content/* with the service set to None.
  2. Worker Deployment: to deploy the worker in your Cloudflare account, AIDEM will need:
NameDescription
account_idCloudflare Account ID, extracted from Cloudflare Dashboard
zone_idCloudflare Zone ID, extracted from Cloudflare Dashboard
domainThe domain of the target website (e.g., example.com)
cloudflare_api_tokenCloudflare API Token with Workers Scripts Edit, Workers Scripts Read, Workers Routes Read, Workers Routes Edit, and Zone Read permissions.
  1. AdUnits Definition: you can send your AdUnits definition to AIDEM for validation and activation.
  2. Canary Deployment: Athena will be activated only on aidemathena subdomain (e.g., aidemathena.example.com) to verify all features are working as intended.
  3. Production Deployment: Athena will be activated only on the actual root subdomain (e.g., www.example.com).

AdUnit Definition

NameScopeDescriptionExampleType
placementIdrequiredUnique publisher tag ID'ABCDEF'String
mediatyperequiredOne of banner or video'banner'String
banner_sizesoptionalRequired for mediatype=banner,List of the sizes wanted[[300, 250], [300,600]]Array
video_contextoptionalRequired for mediatype=video, one of instream or outstream'instream'String
video_playerSizeoptionalRequired for mediatype=video, width and height of the player'[640, 480]'Array
video_maxdurationoptionalRequired for mediatype=video, maximum video ad duration in seconds30Integer
video_mindurationoptionalRequired for mediatype=video, minimum video ad duration in seconds5Integer

Cloudflare Worker Config

Enviroment Variables

These Enviroment Variables will be provided from AIDEM. No action is needed on the Publisher side.

NameScopeDescriptionExampleType
siteIdrequiredUnique site ID. Using your domain name is a good pick.'ABCDEF'String
publisherIdrequiredUnique publisher ID'FEDCBA'String
seedrequireda 64 chars random string generated with openssl rand -hex 3228d046d3b...a4e5d1476fString