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 three categories:
- Raw Context Variables – Values obtained directly from backend services (Geo, Weather, Network, Bot, Time).
- Derived Context Variables – Values computed from one or more raw context variables.
- Browser Context Variables – Values obtained directly from the browser at runtime.
Variable Categories
Category | Source | Description |
|---|---|---|
Geo | Backend | User location |
Weather | Backend | Current weather conditions |
Network | Backend | ISP, protocol, RTT |
Bot | Backend | Bot detection |
Time | Backend | Local time information |
Device | Browser | Device characteristics |
Viewport | Browser | Viewport dimensions |
Derived | Backend | Computed contextual values |
Raw Context Variables
Geo
Variable | Type | Description |
|---|---|---|
| String | ISO country code |
| String | City name |
| String | State or region |
| Number | Latitude |
| Number | Longitude |
| String | IANA timezone |
Weather
Variable | Type | Description |
|---|---|---|
| Number | Temperature (°C) |
| Number | Feels-like temperature |
| Number | Humidity (%) |
| String | Weather condition |
| String | Icon URL |
| String | Description |
| Boolean | Day/Night |
| Number | Precipitation |
| Number | Wind speed |
| Number | UV Index |
| Number | Visibility |
| String | Sunrise |
| String | Sunset |
Time
Variable | Type | Description |
|---|---|---|
| Number | Unix timestamp |
| Number | Hour (0–23) |
| Number | Day index |
| String | IANA timezone |
Network
Variable | Type | Description |
|---|---|---|
| String | ISP name |
| Number | ASN |
| String | HTTP protocol |
| Number | Round-trip time |
Bot
Variable | Type | Description |
|---|---|---|
| Number | Null | Bot score |
| Boolean | Bot detection |
| Boolean | Corporate proxy |
Advanced Context Variables
Overview
Advanced Context Variables provide higher-level contextual information that creatives can consume directly without implementing business logic.
Weather
Variable | Parameters | Type | Possible Values | Description |
|---|---|---|---|---|
|
| String |
,
,
| Categorizes the current temperature. |
|
| String |
,
,
,
,
,
| Normalizes weather conditions into common categories. |
|
| String |
,
,
,
| Classifies UV intensity. |
|
,
| String |
,
,
,
| Indicates perceived outdoor comfort. |
|
| String |
,
,
,
| Categorizes wind intensity. |
|
| Boolean |
,
| Indicates whether it is currently daytime. |
|
| String |
,
,
,
| Classifies precipitation intensity. |
|
| String |
,
,
| Categorizes current visibility. |
|
,
,
,
| String |
,
,
| Indicates suitability for outdoor activities. |
Time
Variable | Parameters | Type | Possible Values | Description |
|---|---|---|---|---|
|
| String |
,
,
,
,
| Current part of the day. |
|
| Boolean |
,
| Indicates whether today is Saturday or Sunday. |
|
,
| Boolean |
,
| Indicates whether current time falls within typical work hours. |
|
| Boolean |
,
| Indicates typical commuting periods. |
|
| String |
,
,
,
,
| Current meal period. |
|
,
| String |
,
,
| General activity state based on time. |
Network
Variable | Parameters | Type | Possible Values | Description |
|---|---|---|---|---|
|
,
| String |
,
,
| Overall network performance classification. |
|
,
| Boolean |
,
| Indicates whether the connection is suitable for rich media. |
|
| String |
,
,
| Recommended video quality tier. |
Traffic
Variable | Parameters | Type | Possible Values | Description |
|---|---|---|---|---|
|
,
,
| String |
,
,
| Overall traffic quality assessment. |
|
,
,
| Boolean |
,
| Indicates potentially suspicious traffic. |
|
,
,
| Number |
| Numeric trust score for the request. |
Audience
Variable | Parameters | Type | Possible Values | Description |
|---|---|---|---|---|
|
,
,
,
,
| Number |
| Indicates how suitable current conditions are for outdoor activity. |
|
| String |
,
,
| Likelihood that the user is outdoors. |
|
,
,
,
,
,
,
| String |
,
,
| Estimated shopping intent. |
|
,
,
,
| String |
,
,
| Estimated likelihood of interacting with the creative. |
|
,
,
,
,
| String |
,
,
,
,
| Estimated current mobility state. |
|
,
,
,
,
| String |
,
,
,
| Estimated user mindset. |
|
,
,
,
,
| String |
,
,
| Estimated purchasing context. |
Device
Variable | Parameters | Type | Possible Values | Description |
|---|---|---|---|---|
|
,
| Boolean |
,
| Indicates whether the device and connection are suitable for rich media experiences. |
|
,
,
,
| String |
,
,
| Recommended creative experience tier. |
Media
Variable | Parameters | Type | Possible Values | Description |
|---|---|---|---|---|
|
,
| String |
,
,
,
| Recommended maximum video resolution for the current connection. |