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 https://www.ampproject.org.
There are a couple of restrictions you should take into account before implementing AMP:
- Counting impressions happens by using track requests, not by using logs.
- Separate formats and templates are necessary. This means that you 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, you can use only image creatives.
AMP Ad Documentation
Adhese ad tag example
The tag consists of 9 parameters of which 8 are required.
The width of the ad format as defined in Adhese.
|height||The height of the ad format as defined in Adhese.||no|
|type||Will always have the value "adhese".||no|
|data-location||The location code as defined in Adhese.||no|
|data-position||The position code as defined in Adhese.||yes|
|data-format||The format code as defined in Adhese.||no|
|data-account||In most cases this will match your Adhese account name. Contact Support.||no|
|data-request-type||Contact Support to know the value of this parameter.||no|
Similar to a 'regular' Adhese implementation, you can add extra target parameters to the request.
When using this json parameter, you have 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.
To let the AMP page know an ad is available a custom event is used called "adhLoaded".
This event should contain an object 'detail' which in turn contains 3 parameters and should be bound to the div with ID "c".
- isReady: always equals 1, except if we are sending back an empty fallback ad
- width: the width of the format, use this parameter by determining <ADHESE_WIDTH>
- height: the height of the format, use this parameter by determining <ADHESE_HEIGHT>
A fallback campaign is required to inform AMP no ad is available. This way, they can alter the iframe dimensions so the container won't be visible.