Skip to end of metadata
Go to start of metadata

This chapter explains the setup of the Adhese ad tags in your AMP pages.

For more information about the Google's Accelerated Mobile Pages project, please go to



There are a couple of restrictions that should be taken into account before implementing AMP.

  • Impressions will be counted using track requests, and not by using logs.
  • Separate formats and templates will be necessary. This means that you will have to create separate bookings to run on AMP pages.
  • The 'all-together' and 'exclusive' options are not available
  • Live previews are not available
  • For now, only image creatives can be used.


AMP Ad Documentation

Adhese ad tag example

The tag consists of 9 parameters of which 8 are required.

<amp-ad width=300 height=250
    json='{"targeting":{"br": ["sport", "info"],"dt": ["desktop"]}}'>


Required parameters:


The width of the ad format as defined in Adhese.

heightThe height of the ad format as defined in
typeWill always have the value "adhese"no
data-locationThe location code as defined in
data-positionThe position code as defined in Adhese.yes
data-formatThe format code as defined in
data-accountIn most cases this will match your Adhese account name. Contact
data-request-typeContact support to know the value of this


Optional parameter:


Similar to a 'regular' Adhese implementation, extra target parameters can be added to the request.

When using this parameter, you will be required to start with a 'targeting' property as shown in the example.

The 'targeting' property itself, consists of the target prefixes (which are configured in your Adhese account) with as value an array of 1 or more targets.

	"targeting": {
		"br": ["sport", "info"],
		"dt": ["desktop"]



Position template

To be able to let the AMP page know an ad is available, we use a custom event called "adhLoaded".
This event should contains an object 'detail' which in turn contains 3 parameters and should be bound to the div with ID "c".

  • isReady: will always be set to 1, except if we are sending back an empty fallback ad
  • width: the width of the format, can be filled in by using <ADHESE_WIDTH>
  • height: the height of the format, can be filled in by using <ADHESE_HEIGHT>


var a = new CustomEvent("adhLoaded",{
detail: {
isReady: ready,
var amp_container = document.querySelector("#c");


A fallback campaign is required so we can inform AMP that no ad is available.
This way, they can alter the iframe dimensions so that the container won't be visible.

  • No labels