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.
- 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. - Worker Deployment: to deploy the worker in your Cloudflare account, AIDEM will need:
Name | Description |
---|---|
account_id | Cloudflare Account ID, extracted from Cloudflare Dashboard |
zone_id | Cloudflare Zone ID, extracted from Cloudflare Dashboard |
domain | The domain of the target website (e.g., example.com ) |
cloudflare_api_token | Cloudflare API Token with Workers Scripts Edit, Workers Scripts Read, Workers Routes Read, Workers Routes Edit, and Zone Read permissions. |
- AdUnits Definition: you can send your AdUnits definition to AIDEM for validation and activation.
- Canary Deployment: Athena will be activated only on
aidemathena
subdomain (e.g.,aidemathena.example.com
) to verify all features are working as intended. - Production Deployment: Athena will be activated only on the actual root subdomain (e.g.,
www.example.com
).
AdUnit Definition
Name | Scope | Description | Example | Type |
---|---|---|---|---|
placementId | required | Unique publisher tag ID | 'ABCDEF' | String |
mediatype | required | One of banner or video | 'banner' | String |
banner_sizes | optional | Required for mediatype=banner ,List of the sizes wanted | [[300, 250], [300,600]] | Array |
video_context | optional | Required for mediatype=video , one of instream or outstream | 'instream' | String |
video_playerSize | optional | Required for mediatype=video , width and height of the player | '[640, 480]' | Array |
video_maxduration | optional | Required for mediatype=video , maximum video ad duration in seconds | 30 | Integer |
video_minduration | optional | Required for mediatype=video , minimum video ad duration in seconds | 5 | Integer |
Cloudflare Worker Config
Enviroment Variables
These Enviroment Variables will be provided from AIDEM. No action is needed on the Publisher side.
Name | Scope | Description | Example | Type |
---|---|---|---|---|
siteId | required | Unique site ID. Using your domain name is a good pick. | 'ABCDEF' | String |
publisherId | required | Unique publisher ID | 'FEDCBA' | String |
seed | required | a 64 chars random string generated with openssl rand -hex 32 | 28d046d3b...a4e5d1476f | String |