Skip to main content

Composite data sources

It is possible to compose data sent to the layout from several data sources of different types. For example:

{
"data": {
"offers": {"$playback-data": 582},
"coupons": {"$playback-data": 583}
}
}

Instead of {"$playback-data": 582} the player will substitute the data value from the corresponding source.

The following substitutions can also be passed to composite data:

{
"data": {"$playback-data": 584},
"options": {
// Player ID
"player_id": {"$player-id": 1},
// Player tag names
"player_tags": {"$player-tags": ["Moscow", "ZAO"]}
// A default value is also passed (used when rendering outside the player context, for example, for
// previews)
}
}