Stack sequence
Sequencing
The sequence parameter can be used in advar templates to sort ads and is therefor only relevant for stack implementations where multiple ads are send back for one placement. Some examples are:
- VAST Adpods
- Digital Out Of Home playlists
- Native advertising
Sequence suggestions are optional and - when implemented - Adhese will do its best to place the ad in the desired position within the response.
You can fill in any number as a sequence suggestion but obviously it only makes sense to use unique numbers. An option is to use Adhese macro's such as <ADHESE_LIB_ID>
to implement sorting based on the creative ID.
The sequence value will be stripped out of the response when rendering the adpod or stack response.
Templates
VAST
When sequence=0
, the ad prefers to be placed first in a pod. When sequence=-1
, the ad prefers to be placed last in a pod. In case sequence=1
it prefers the second spot and so on. This ordering happens after the ads are selected, so there is no guarantee that an ad with sequence=0
will always be first in the pod (except if it is the highest priority of all possible options).
JSON
The sequence field needs to be added to the main structure of the JSON template. The ordering logic will not work if the field is added to a nested object within the JSON template.