# Technical Guides

# Variables From Tags to_Custom_Codes

<span style="color: rgb(0, 0, 0); white-space: pre-wrap;">This document explains how to define variables inside </span>****INS tags****<span style="color: rgb(0, 0, 0); white-space: pre-wrap;"> and </span>****VAST tags****<span style="color: rgb(0, 0, 0); white-space: pre-wrap;">, and how these variables are accessed inside your </span>****custom methods****<span style="color: rgb(0, 0, 0);">.</span>

<span style="color: rgb(0, 0, 0);">It also includes syntax, examples, naming conventions, usage flow, and best practices.</span>

#### ****1. Overview****

<span style="color: rgb(0, 0, 0); white-space: pre-wrap;">Variables allow you to pass dynamic values from the </span>****ad tag****<span style="color: rgb(0, 0, 0); white-space: pre-wrap;"> (INS or VAST) directly into your custom code logic.</span>  
<span style="color: rgb(0, 0, 0); white-space: pre-wrap;"> You can control creative behavior such as:</span>

- <span style="color: rgb(0, 0, 0);">Colors</span>
- <span style="color: rgb(0, 0, 0);">Text</span>
- <span style="color: rgb(0, 0, 0);">URLs</span>
- <span style="color: rgb(0, 0, 0);">Durations</span>
- <span style="color: rgb(0, 0, 0);">Images &amp; assets</span>
- <span style="color: rgb(0, 0, 0);">Screen properties</span>
- <span style="color: rgb(0, 0, 0);">Widget-level properties</span>

<span style="color: rgb(0, 0, 0);">This helps make creatives dynamic without re-uploading or editing visuals.</span>

#### ****2. Variables in INS Tags****

<span style="color: rgb(0, 0, 0);">INS tags use the following syntax:</span>

<span style="color: rgb(0, 0, 0);">data-var-{name}="{value}"</span>

****Rules****

- <span style="color: rgb(0, 0, 0); white-space: pre-wrap;">Replace </span>****{name}****<span style="color: rgb(0, 0, 0); white-space: pre-wrap;"> with your variable name</span>
- <span style="color: rgb(0, 0, 0); white-space: pre-wrap;">Replace </span>****{value}****<span style="color: rgb(0, 0, 0); white-space: pre-wrap;"> with your desired value</span>
- <span style="color: rgb(0, 0, 0);">Use lowercase, hyphen-friendly variable names</span>
- <span style="color: rgb(0, 0, 0);">Add unlimited variables</span>
- <span style="color: rgb(0, 0, 0);">All variables become available in your custom code</span>

```
<ins id="adctv"
     class="adctv-ads"
     data-tenant="1"
     data-cdn="https://ads.adctv.com/"
     data-user="54"
     data-campaign="69284d2b2282b"
     data-placement="69313f977d871"
     data-creative="69313829e374f"
     data-height="600"
     data-width="300"
     data-responsive="false"
     data-adtype="generic_ad"
     data-env="false"
     data-var-img="https://ads.adctv.com/assets/1/3b/6931551b16f3b.png"
     data-var-bgcolor="yellow">
</ins>

<script src="https://ads.adctv.com/scripts/src/v2/tag.ins/tag.ins.js"></script>
```

<span style="color: rgb(0, 0, 0);">How variables appear inside your custom method</span>

```html
variables.bgcolor
variables.img
```

#### ****3. Variables in VAST Tags****

<span style="color: rgb(0, 0, 0);">VAST tags support variables by appending them as query parameters:</span>

<span style="color: rgb(0, 0, 0);">&amp;var-{name}={value}</span>

<span style="color: rgb(0, 0, 0);">Example — VAST URL</span>

<span style="color: rgb(0, 0, 0);">https://example.com/vast.xml?creative=123&amp;placement=45 &amp;var-theme=dark &amp;var-autoplay=true &amp;var-volume=0.5</span>

<span style="color: rgb(0, 0, 0);">Inside your custom logic</span>

```javascript
variables.theme       // "dark"
variables.autoplay    // "true"
variables.volume      // "0.5"
```

#### ****4. Accessing Variables Inside Custom Methods****

<span style="color: rgb(0, 0, 0);">Below are the steps required to apply tag variables inside your creative.</span>

##### ****4.1 Select “Events” Tab****

![](https://docs.adctv.com/uploads/images/gallery/2025-12/embedded-image-khcj7vhu.png)

##### ****4.2 Select a Trigger from the List****

![](https://docs.adctv.com/uploads/images/gallery/2025-12/embedded-image-16hgfhbw.png)

![](https://docs.adctv.com/uploads/images/gallery/2025-12/embedded-image-mdhwotoz.png)

##### ****4.4 Create a New Method****

<span style="color: rgb(0, 0, 0);">You can now write your own custom code.</span>

![](https://docs.adctv.com/uploads/images/gallery/2025-12/embedded-image-xmvx5bro.png)

##### ****4.5 Writing Custom Code (Example)****

<span style="color: rgb(0, 0, 0);">In this example, the creative uses two components:</span>

****Countdown Timer****  
****Image Component****

<span style="color: rgb(0, 0, 0); white-space: pre-wrap;">The image component has </span>****no uploaded asset****<span style="color: rgb(0, 0, 0);">.</span>  
<span style="color: rgb(0, 0, 0); white-space: pre-wrap;"> Instead, we inject the image </span>****dynamically****<span style="color: rgb(0, 0, 0); white-space: pre-wrap;"> using a variable from the tag.</span>

<span style="color: rgb(0, 0, 0);">We use:</span>

- <span style="color: rgb(24, 128, 56);">img</span><span style="color: rgb(0, 0, 0); white-space: pre-wrap;"> → for image URL</span>
- <span style="color: rgb(24, 128, 56);">bgcolor</span><span style="color: rgb(0, 0, 0); white-space: pre-wrap;"> → for screen background color</span>

****Accessing variables****

```html
variables.img
variables.bgcolor
```

****Important:****

<span style="color: rgb(0, 0, 0); white-space: pre-wrap;">To apply variables to a specific component, </span>****select the element by its ID****<span style="color: rgb(0, 0, 0); white-space: pre-wrap;"> first.The widget and screen IDs will visible on custom method codeblocks</span>

![](https://docs.adctv.com/uploads/images/gallery/2025-12/embedded-image-jtpvfmss.png)

<span style="color: rgb(0, 0, 0);">Sample Custom Code</span>

```html
/*
Layers and their IDs
 Screen list
 Screen 1 = #s10001_14318

 Widget list
 Countdown = #w10006_74144
 Image = #w10007_24899
*/
let img = document.querySelector("#w10007_24899");
img.children[0].setAttribute("source", variables.img);

let screen = document.querySelector("#s10001_14318");
screen.style.background = variables.bgcolor;
```

##### ****4.6 Save the Custom Event****

![](https://docs.adctv.com/uploads/images/gallery/2025-12/embedded-image-0kvkwcoo.png)

##### ****4.7 Export the Creative****

![](https://docs.adctv.com/uploads/images/gallery/2025-12/embedded-image-aaioojn1.png)

#### ****5. Updating Variables in the Tag****

<span style="color: rgb(0, 0, 0);">Use the exported INS/VAST tag on your domain and append the variables you want to control.</span>

<span style="color: rgb(0, 0, 0);">These variables will be available inside your custom code through:</span>

```javascript
variables.{name}
// or 
variables["{name}"]
```

<span style="color: rgb(0, 0, 0);">Example INS Tag with Variables</span>

```javascript
<ins id="adctv"
     class="adctv-ads"
     data-tenant="1"
     data-cdn="https://ads.adctv.com/"
     data-user="54"
     data-campaign="69284d2b2282b"
     data-placement="69313f977d871"
     data-creative="69313829e374f"
     data-height="600"
     data-width="300"
     data-responsive="false"
     data-adtype="generic_ad"
     data-env="false"
     data-var-img="https://ads.adctv.com/assets/1/3b/6931551b16f3b.png"
     data-var-bgcolor="yellow">
</ins>
<script src="https://ads.adctv.com/scripts/src/v2/tag.ins/tag.ins.js"></script>
```

****Variables used****

- <span style="color: rgb(24, 128, 56);">data-var-img</span>
- <span style="color: rgb(24, 128, 56);">data-var-bgcolor</span>

****Preview****

[![variables preview.gif](https://docs.adctv.com/uploads/images/gallery/2025-12/variables-preview.gif)](https://docs.adctv.com/uploads/images/gallery/2025-12/variables-preview.gif)

#### ****6. Usage****

<span style="color: rgb(0, 0, 0); white-space: pre-wrap;">Variables make creatives dynamic and reusable </span>****without modifying the creative****<span style="color: rgb(0, 0, 0);">.</span>

<span style="color: rgb(0, 0, 0);">By simply changing the variables inside the tag, you can deliver different versions instantly.</span>

****This eliminates the need to:****

- <span style="color: rgb(0, 0, 0);">Create multiple creatives</span>
- <span style="color: rgb(0, 0, 0);">Upload separate assets</span>
- <span style="color: rgb(0, 0, 0);">Manage separate placements</span>
- <span style="color: rgb(0, 0, 0);">Duplicate analytics</span>

<span style="color: rgb(0, 0, 0); white-space: pre-wrap;">Analytics remain </span>****centralized in a single placement****<span style="color: rgb(0, 0, 0);">.</span>

#### ****7. What Users Can Do With This****

##### ****7.1 Update Widget-Specific Properties****

<span style="color: rgb(0, 0, 0);">Change component properties using variables:</span>

- <span style="color: rgb(0, 0, 0);">Text</span>
- <span style="color: rgb(0, 0, 0);">Colors</span>
- <span style="color: rgb(0, 0, 0);">Images</span>
- <span style="color: rgb(0, 0, 0);">Sizes</span>
- <span style="color: rgb(0, 0, 0);">Timings</span>
- <span style="color: rgb(0, 0, 0);">Visibility</span>
- <span style="color: rgb(0, 0, 0);">URLs</span>

##### ****7.2 Create Region-Specific or Partner-Specific Content****

<span style="color: rgb(0, 0, 0);">Output variations for different:</span>

- <span style="color: rgb(0, 0, 0);">Headlines</span>
- <span style="color: rgb(0, 0, 0);">Offers</span>
- <span style="color: rgb(0, 0, 0);">CTAs</span>
- <span style="color: rgb(0, 0, 0);">Images</span>

<span style="color: rgb(0, 0, 0);">Perfect for large-scale distribution.</span>

##### ****7.3 Enable Real-Time Content Updates****

<span style="color: rgb(0, 0, 0);">Marketing teams can change content instantly by editing tag variables.</span>

- <span style="color: rgb(0, 0, 0);">No rebuild</span>
- <span style="color: rgb(0, 0, 0);">No re-upload</span>
- <span style="color: rgb(0, 0, 0);">No developer needed</span>

##### ****7.4 Reduce Operational Overhead****

<span style="color: rgb(0, 0, 0);">One creative → unlimited variations</span>  
<span style="color: rgb(0, 0, 0);">Cuts down asset creation time and maintenance.</span>

##### ****7.5 Support Dynamic Personalization****

<span style="color: rgb(0, 0, 0);">Variables allow personalization based on:</span>

- <span style="color: rgb(0, 0, 0);">Domain</span>
- <span style="color: rgb(0, 0, 0);">Audience segment</span>
- <span style="color: rgb(0, 0, 0);">Publisher</span>
- <span style="color: rgb(0, 0, 0);">Geo</span>
- <span style="color: rgb(0, 0, 0);">Campaign logic</span>

<span style="color: rgb(0, 0, 0);">Everything becomes adjustable from the tag.</span>

# Context Variables

#### Overview

Context Variables are values describing the user's current environment. They are resolved before the creative is rendered and are available for binding directly in components.

Context variables are divided into two categories:

- ****Context Variables****<span style="white-space: pre-wrap;"> – Values obtained directly from backend services (Geo, Weather, Network, Bot, Time).</span>
- ****Advanced Context Variables****<span style="white-space: pre-wrap;"> – Values computed from one or more raw context variables.</span>

---

#### Variable Categories

<table id="bkmrk-categorysourcedescri"><colgroup><col></col><col></col><col></col></colgroup><tbody><tr><th>Category

</th><th>Source

</th><th>Description

</th></tr><tr><td>Geo

</td><td>Backend

</td><td>User location

</td></tr><tr><td>Weather

</td><td>Backend

</td><td>Current weather conditions

</td></tr><tr><td>Network

</td><td>Backend

</td><td>ISP, protocol, RTT

</td></tr><tr><td>Bot

</td><td>Backend

</td><td>Bot detection

</td></tr><tr><td>Time

</td><td>Backend

</td><td>Local time information

</td></tr><tr><td>Device

</td><td>Browser

</td><td>Device characteristics

</td></tr><tr><td>Viewport

</td><td>Browser

</td><td>Viewport dimensions

</td></tr><tr><td>Derived

</td><td>Backend

</td><td>Computed contextual values

</td></tr></tbody></table>

---

#### Context Variables

#### Geo

<table id="bkmrk-variabletypedescript"><colgroup><col></col><col></col><col></col></colgroup><tbody><tr><th>Variable

</th><th>Type

</th><th>Description

</th></tr><tr><td>`<span class="editor-theme-code">geo.country</span>`

</td><td>String

</td><td>ISO country code

</td></tr><tr><td>`<span class="editor-theme-code">geo.city</span>`

</td><td>String

</td><td>City name

</td></tr><tr><td>`<span class="editor-theme-code">geo.region</span>`

</td><td>String

</td><td>State or region

</td></tr><tr><td>`<span class="editor-theme-code">geo.lat</span>`

</td><td>Number

</td><td>Latitude

</td></tr><tr><td>`<span class="editor-theme-code">geo.lng</span>`

</td><td>Number

</td><td>Longitude

</td></tr><tr><td>`<span class="editor-theme-code">geo.timezone</span>`

</td><td>String

</td><td>IANA timezone

</td></tr></tbody></table>

---

#### Weather

<table id="bkmrk-variabletypedescript-1"><colgroup><col></col><col></col><col></col></colgroup><tbody><tr><th>Variable

</th><th>Type

</th><th>Description

</th></tr><tr><td>`<span class="editor-theme-code">weather.temp</span>`

</td><td>Number

</td><td>Temperature (°C)

</td></tr><tr><td>`<span class="editor-theme-code">weather.feels_like</span>`

</td><td>Number

</td><td>Feels-like temperature

</td></tr><tr><td>`<span class="editor-theme-code">weather.humidity</span>`

</td><td>Number

</td><td>Humidity (%)

</td></tr><tr><td>`<span class="editor-theme-code">weather.condition</span>`

</td><td>String

</td><td>Weather condition

</td></tr><tr><td>`<span class="editor-theme-code">weather.icon</span>`

</td><td>String

</td><td>Icon URL

</td></tr><tr><td>`<span class="editor-theme-code">weather.text</span>`

</td><td>String

</td><td>Description

</td></tr><tr><td>`<span class="editor-theme-code">weather.is_day</span>`

</td><td>Boolean

</td><td>Day/Night

</td></tr><tr><td>`<span class="editor-theme-code">weather.precip</span>`

</td><td>Number

</td><td>Precipitation

</td></tr><tr><td>`<span class="editor-theme-code">weather.wind_speed</span>`

</td><td>Number

</td><td>Wind speed

</td></tr><tr><td>`<span class="editor-theme-code">weather.uv_index</span>`

</td><td>Number

</td><td>UV Index

</td></tr><tr><td>`<span class="editor-theme-code">weather.visibility</span>`

</td><td>Number

</td><td>Visibility

</td></tr><tr><td>`<span class="editor-theme-code">weather.sunrise</span>`

</td><td>String

</td><td>Sunrise

</td></tr><tr><td>`<span class="editor-theme-code">weather.sunset</span>`

</td><td>String

</td><td>Sunset

</td></tr></tbody></table>

---

#### Time

<table id="bkmrk-variabletypedescript-2"><colgroup><col></col><col></col><col></col></colgroup><tbody><tr><th>Variable

</th><th>Type

</th><th>Description

</th></tr><tr><td>`<span class="editor-theme-code">time.timestamp</span>`

</td><td>Number

</td><td>Unix timestamp

</td></tr><tr><td>`<span class="editor-theme-code">time.hour</span>`

</td><td>Number

</td><td>Hour (0–23)

</td></tr><tr><td>`<span class="editor-theme-code">time.day_of_week</span>`

</td><td>Number

</td><td>Day index

</td></tr><tr><td>`<span class="editor-theme-code">time.timezone</span>`

</td><td>String

</td><td>IANA timezone

</td></tr></tbody></table>

---

#### Network

<table id="bkmrk-variabletypedescript-3"><colgroup><col></col><col></col><col></col></colgroup><tbody><tr><th>Variable

</th><th>Type

</th><th>Description

</th></tr><tr><td>`<span class="editor-theme-code">network.isp</span>`

</td><td>String

</td><td>ISP name

</td></tr><tr><td>`<span class="editor-theme-code">network.asn</span>`

</td><td>Number

</td><td>ASN

</td></tr><tr><td>`<span class="editor-theme-code">network.protocol</span>`

</td><td>String

</td><td>HTTP protocol

</td></tr><tr><td>`<span class="editor-theme-code">network.rtt</span>`

</td><td>Number

</td><td>Round-trip time

</td></tr></tbody></table>

---

#### Bot

<table id="bkmrk-variabletypedescript-4"><colgroup><col></col><col></col><col></col></colgroup><tbody><tr><th>Variable

</th><th>Type

</th><th>Description

</th></tr><tr><td>`<span class="editor-theme-code">bot.score</span>`

</td><td>Number | Null

</td><td>Bot score

</td></tr><tr><td>`<span class="editor-theme-code">bot.is_bot</span>`

</td><td>Boolean

</td><td>Bot detection

</td></tr><tr><td>`<span class="editor-theme-code">bot.is_corporate_proxy</span>`

</td><td>Boolean

</td><td>Corporate proxy

</td></tr></tbody></table>

---

### Advanced Context Variables

#### Overview

Advanced Context Variables provide higher-level contextual information that creatives can consume directly without implementing business logic.

---

#### Weather

<table id="bkmrk-variableparametersty"><colgroup><col></col><col></col><col></col><col></col><col></col></colgroup><tbody><tr><th>Variable

</th><th>Parameters

</th><th>Type

</th><th>Possible Values

</th><th>Description

</th></tr><tr><td>`<span class="editor-theme-code">weather.temperature_band</span>`

</td><td>`<span class="editor-theme-code">temp</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">hot</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">warm</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">cold</span>`

</td><td>Categorizes the current temperature.

</td></tr><tr><td>`<span class="editor-theme-code">weather.condition_type</span>`

</td><td>`<span class="editor-theme-code">condition</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">sunny</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">cloudy</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">rainy</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">stormy</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">snowy</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">foggy</span>`

</td><td>Normalizes weather conditions into common categories.

</td></tr><tr><td>`<span class="editor-theme-code">weather.uv_level</span>`

</td><td>`<span class="editor-theme-code">uv_index</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">low</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">moderate</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">high</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">extreme</span>`

</td><td>Classifies UV intensity.

</td></tr><tr><td>`<span class="editor-theme-code">weather.comfort_level</span>`

</td><td>`<span class="editor-theme-code">temp</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">humidity</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">comfortable</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">humid</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">hot_humid</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">cold</span>`

</td><td>Indicates perceived outdoor comfort.

</td></tr><tr><td>`<span class="editor-theme-code">weather.wind_level</span>`

</td><td>`<span class="editor-theme-code">wind_speed</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">calm</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">moderate</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">windy</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">stormy</span>`

</td><td>Categorizes wind intensity.

</td></tr><tr><td>`<span class="editor-theme-code">weather.is_daylight</span>`

</td><td>`<span class="editor-theme-code">is_day</span>`

</td><td>Boolean

</td><td>`<span class="editor-theme-code">true</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">false</span>`

</td><td>Indicates whether it is currently daytime.

</td></tr><tr><td>`<span class="editor-theme-code">weather.precipitation_level</span>`

</td><td>`<span class="editor-theme-code">precip</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">none</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">light</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">moderate</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">heavy</span>`

</td><td>Classifies precipitation intensity.

</td></tr><tr><td>`<span class="editor-theme-code">weather.visibility_level</span>`

</td><td>`<span class="editor-theme-code">visibility</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">clear</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">moderate</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">poor</span>`

</td><td>Categorizes current visibility.

</td></tr><tr><td>`<span class="editor-theme-code">weather.activity_suitability</span>`

</td><td>`<span class="editor-theme-code">temp</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">precip</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">uv_index</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">wind_speed</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">excellent</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">good</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">poor</span>`

</td><td>Indicates suitability for outdoor activities.

</td></tr></tbody></table>

---

#### Time

<table id="bkmrk-variableparametersty-1"><colgroup><col></col><col></col><col></col><col></col><col></col></colgroup><tbody><tr><th>Variable

</th><th>Parameters

</th><th>Type

</th><th>Possible Values

</th><th>Description

</th></tr><tr><td>`<span class="editor-theme-code">time.daypart</span>`

</td><td>`<span class="editor-theme-code">hour</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">early_morning</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">morning</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">afternoon</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">evening</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">night</span>`

</td><td>Current part of the day.

</td></tr><tr><td>`<span class="editor-theme-code">time.is_weekend</span>`

</td><td>`<span class="editor-theme-code">day_of_week</span>`

</td><td>Boolean

</td><td>`<span class="editor-theme-code">true</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">false</span>`

</td><td>Indicates whether today is Saturday or Sunday.

</td></tr><tr><td>`<span class="editor-theme-code">time.is_work_hours</span>`

</td><td>`<span class="editor-theme-code">hour</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_weekend</span>`

</td><td>Boolean

</td><td>`<span class="editor-theme-code">true</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">false</span>`

</td><td>Indicates whether current time falls within typical work hours.

</td></tr><tr><td>`<span class="editor-theme-code">time.is_commuting_hours</span>`

</td><td>`<span class="editor-theme-code">hour</span>`

</td><td>Boolean

</td><td>`<span class="editor-theme-code">true</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">false</span>`

</td><td>Indicates typical commuting periods.

</td></tr><tr><td>`<span class="editor-theme-code">time.meal_period</span>`

</td><td>`<span class="editor-theme-code">hour</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">breakfast</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">lunch</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">snack</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">dinner</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">late_night</span>`

</td><td>Current meal period.

</td></tr><tr><td>`<span class="editor-theme-code">time.productivity_state</span>`

</td><td>`<span class="editor-theme-code">hour</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_work_hours</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">productive</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">relaxed</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">sleeping</span>`

</td><td>General activity state based on time.

</td></tr></tbody></table>

---

#### Network

<table id="bkmrk-variableparametersty-2"><colgroup><col></col><col></col><col></col><col></col><col></col></colgroup><tbody><tr><th>Variable

</th><th>Parameters

</th><th>Type

</th><th>Possible Values

</th><th>Description

</th></tr><tr><td>`<span class="editor-theme-code">network.speed_tier</span>`

</td><td>`<span class="editor-theme-code">rtt</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">protocol</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">fast</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">moderate</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">slow</span>`

</td><td>Overall network performance classification.

</td></tr><tr><td>`<span class="editor-theme-code">network.supports_rich_media</span>`

</td><td>`<span class="editor-theme-code">speed_tier</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">protocol</span>`

</td><td>Boolean

</td><td>`<span class="editor-theme-code">true</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">false</span>`

</td><td>Indicates whether the connection is suitable for rich media.

</td></tr><tr><td>`<span class="editor-theme-code">network.video_quality_tier</span>`

</td><td>`<span class="editor-theme-code">speed_tier</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">low</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">medium</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">high</span>`

</td><td>Recommended video quality tier.

</td></tr></tbody></table>

---

#### Traffic

<table id="bkmrk-variableparametersty-3"><colgroup><col></col><col></col><col></col><col></col><col></col></colgroup><tbody><tr><th>Variable

</th><th>Parameters

</th><th>Type

</th><th>Possible Values

</th><th>Description

</th></tr><tr><td>`<span class="editor-theme-code">traffic.quality_tier</span>`

</td><td>`<span class="editor-theme-code">bot_score</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_bot</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_corporate_proxy</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">high</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">medium</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">low</span>`

</td><td>Overall traffic quality assessment.

</td></tr><tr><td>`<span class="editor-theme-code">traffic.is_suspicious</span>`

</td><td>`<span class="editor-theme-code">bot_score</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_bot</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_corporate_proxy</span>`

</td><td>Boolean

</td><td>`<span class="editor-theme-code">true</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">false</span>`

</td><td>Indicates potentially suspicious traffic.

</td></tr><tr><td>`<span class="editor-theme-code">traffic.trust_score</span>`

</td><td>`<span class="editor-theme-code">bot_score</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_bot</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_corporate_proxy</span>`

</td><td>Number

</td><td>`<span class="editor-theme-code">0–100</span>`

</td><td>Numeric trust score for the request.

</td></tr></tbody></table>

---

#### Audience

<table id="bkmrk-variableparametersty-4"><colgroup><col></col><col></col><col></col><col></col><col></col></colgroup><tbody><tr><th>Variable

</th><th>Parameters

</th><th>Type

</th><th>Possible Values

</th><th>Description

</th></tr><tr><td>`<span class="editor-theme-code">audience.outdoor_score</span>`

</td><td>`<span class="editor-theme-code">temp</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">precip</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">uv_index</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">wind_speed</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_daylight</span>`

</td><td>Number

</td><td>`<span class="editor-theme-code">0–100</span>`

</td><td>Indicates how suitable current conditions are for outdoor activity.

</td></tr><tr><td>`<span class="editor-theme-code">audience.outdoor_likelihood</span>`

</td><td>`<span class="editor-theme-code">outdoor_score</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">high</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">medium</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">low</span>`

</td><td>Likelihood that the user is outdoors.

</td></tr><tr><td>`<span class="editor-theme-code">audience.commerce_intent</span>`

</td><td>`<span class="editor-theme-code">hour</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_weekend</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_work_hours</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">daypart</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">temp</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">precip</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">condition_type</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">high</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">medium</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">low</span>`

</td><td>Estimated shopping intent.

</td></tr><tr><td>`<span class="editor-theme-code">audience.engagement_likelihood</span>`

</td><td>`<span class="editor-theme-code">quality_tier</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">speed_tier</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">daypart</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_work_hours</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">high</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">medium</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">low</span>`

</td><td>Estimated likelihood of interacting with the creative.

</td></tr><tr><td>`<span class="editor-theme-code">audience.mobility_state</span>`

</td><td>`<span class="editor-theme-code">hour</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_weekend</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_work_hours</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">daypart</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">activity_suitability</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">sleeping</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">commuting</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">working</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">leisure</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">stationary</span>`

</td><td>Estimated current mobility state.

</td></tr><tr><td>`<span class="editor-theme-code">audience.session_mood</span>`

</td><td>`<span class="editor-theme-code">daypart</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_work_hours</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_weekend</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">mobility_state</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">condition_type</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">productive</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">relaxed</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">entertainment</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">rushed</span>`

</td><td>Estimated user mindset.

</td></tr><tr><td>`<span class="editor-theme-code">audience.purchase_context</span>`

</td><td>`<span class="editor-theme-code">daypart</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_work_hours</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">is_weekend</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">mobility_state</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">condition_type</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">impulse</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">relaxed</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">functional</span>`

</td><td>Estimated purchasing context.

</td></tr></tbody></table>

---

#### Device

<table id="bkmrk-variableparametersty-5"><colgroup><col></col><col></col><col></col><col></col><col></col></colgroup><tbody><tr><th>Variable

</th><th>Parameters

</th><th>Type

</th><th>Possible Values

</th><th>Description

</th></tr><tr><td>`<span class="editor-theme-code">device.rich_media_ready</span>`

</td><td>`<span class="editor-theme-code">speed_tier</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">trust_score</span>`

</td><td>Boolean

</td><td>`<span class="editor-theme-code">true</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">false</span>`

</td><td>Indicates whether the device and connection are suitable for rich media experiences.

</td></tr><tr><td>`<span class="editor-theme-code">device.experience_tier</span>`

</td><td>`<span class="editor-theme-code">speed_tier</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">trust_score</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">quality_tier</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">rich_media_ready</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">premium</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">standard</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">lite</span>`

</td><td>Recommended creative experience tier.

</td></tr></tbody></table>

---

#### Media

<table id="bkmrk-variableparametersty-6"><colgroup><col></col><col></col><col></col><col></col><col></col></colgroup><tbody><tr><th>Variable

</th><th>Parameters

</th><th>Type

</th><th>Possible Values

</th><th>Description

</th></tr><tr><td>`<span class="editor-theme-code">media.video_quality</span>`

</td><td>`<span class="editor-theme-code">speed_tier</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">video_quality_tier</span>`

</td><td>String

</td><td>`<span class="editor-theme-code">240p</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">480p</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">720p</span>`

<span style="white-space: pre-wrap;">, </span>

`<span class="editor-theme-code">1080p</span>`

</td><td>Recommended maximum video resolution for the current connection.

</td></tr></tbody></table>