Skip to main content

Stack sequence

Sequencing

The sequence parameter can be used in advar templates to sort ads within the request responseresponse, and is therefortherefore only relevant for stack implementations where multiple ads are send backreturned for one placement.   Some examples are:

  • VAST Adpods 
  • Digital Out Of Home playlists
  • Native advertising

Sequence suggestions are optionaloptional, and - when implemented -implemented, Adhese will do its best to place the ad in the desired position within the response.

You can fill inenter any number as a sequence suggestionsuggestion, but obviouslyobviously, it only makes sense to use unique numbers. An option is to use Adhese macro'smacros such as <ADHESE_LIB_ID> to implement sorting based on the creative ID.

The sequence value will beis stripped outfrom of the response when rendering the adpod or stack response.response is rendered.

Templates

VAST

WhenIf sequence=0, the ad prefersis preferred to be placed first in a pod. WhenIf sequence=-1, the ad prefers to be placed last in a pod. InIf case sequence=1 it prefers the second spotplace 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 (exceptunless if it is the highest priority of all possible options).

<Ad sequence="0">
VAST ad implementation
</Ad>

JSON

The sequence field needs tomust be added to the main structure of the JSON template. The orderingorder logic will not work if the field is added withininside a nested object in the JSON structure.

{
  "sequence": 0,
  "example field": "some value"
}