Gaming API

This document provides a technical overview of the IAS Gaming API.

Overview & Base Endpoint

Overview

Integral Ad Science (IAS) provides a REST Gaming API which allows for sending IAS 2D and 3D viewability measurement data for gaming, VR, and AR digital environments.

Base Endpoint

https://3denvironments.adsafeprotected.com/v1/gaming/{gaming_partner_name}

Contact your IAS representative for the gaming partner name.

Events

REST API to send IAS viewability-specific data for the following events:

Event

Description

load

send when a creative image/video is loaded. load marks the start of the ad session.

unload

send when the image/video is unloaded. unload marks the end of the ad session.

vimp

send for viewable impression when an ad is visible to the user

progress

send to represent the video playback progress

Parameters

Parameter

Type

Description

Notes

event_type

String

An IAS event. See the Event table for more information.

Events are:

load

unload

vimp

progress

event_time

Long

Event creation timestamp in UTC


event_time_zone

String

The time zone of the event creation


event_session_id

String

Event session ID


ad_id

String

Advertiser ID


ad_session_id

String

Unique ad session ID


cum_50pct_inview_dur

Double

Cumulative duration in milliseconds (ms) from the ad session start until the event being fired in which the ad meets:

At least 50% of the ad is on-screen

Screen real estate is 1% or higher

The game window/tab is in focus

Ad angle in relation to the viewport is 55° or lower on all axes


max_cont_50pct_inview_dur

Double

Longest duration (ms) from the ad session start until the event being fired in which the ad meets:

At least 50% of the ad is on-screen

Screen real estate is 1% or higher

The game window/tab is in focus

Ad angle in relation to the viewport is 55° or lower on all axes


cum_100pct_inview_dur

Double

Cumulative duration (ms) from the ad session start until the event being fired in which the ad meets:

At least 100% of the ad is on-screen

Screen real estate is 1% or higher

The game window/tab is in focus

Ad angle in relation to the viewport is 55° or lower on all axes


max_cont_100pct_inview_dur

Double

Most prolonged duration (ms) from the ad session start until the event being fired in which the ad meets:

At least 100% of the ad is on-screen

Screen real estate is 1% or higher

The game window/tab is in focus

Ad angle in relation to the viewport is 55° or lower on all axes


dwell_dur

Double

The duration (ms) from when the ad is loaded and the window containing the ad is active, until the event triggers time. (First impression time - load time)


avg_pct_seen_while_on_scr

Double

Percentage (0.0-1.0) for the average part of the ad seen on-screen in the duration leading up to the event. For example, if 50% of the ad is seen for .5 seconds and then 70% of the ad is seen for .5 seconds before the event is fired, then send 0.6.


avg_pct_seen

Double

Percentage (0.0-1.0) for the average part of the ad seen on-screen during the viewable impression measurement. For example, if 50% of the ad is seen for 0.5 seconds and then 70% of the ad is seen for 0.5 second before the event is fired, then send 0.6.


max_pct_seen_on_scr

Double

Percentage (0.0-1.0) for the maximum part of the ad seen on-screen in the duration leading up to the event. For example, if 50% of the ad is seen for .5 seconds and then 70% of the ad is seen for .5 seconds before the event is fired, then send 0.7.


min_pct_seen_on_scr

Double

Percentage (0.0-1.0) value for the minimum part of the ad seen on-screen in the duration leading up to the event.


avg_on_scr_real_estate

Double

The average screen real estate value in the duration leading up to the event. For example, if the ad took 1.5% of the screen for 5 seconds and then 5% of the screen for 5 seconds before the event is fired, then send 3 (percent).


min_on_scr_real_estate

Double

Percentage (0.0-1.0) value for the minimal screen real estate value during the viewable impression measurement. For example, if the ad took 1.5% of the screen for 0.5 second and then 5% of the screen for 0.5 second before the event is fired, then send 0.015.


max_on_scr_real_estate

Double

Percentage (0.0-1.0) value for the maximum screen real estate value in the duration leading up to the event. For example, if the ad took 1% of the screen for 1 second and then 5% of the screen for 1 second before the event is fired, then send 0.05.


avg_ang_while_on_scr

Double

The average ad angle in relation to the viewport in the duration leading up to the event. On each single measurement, the maximum angle from the X, Y, and Z axes is used to calculate the average. For example, if the ad has a 30 degree angle for 1 second and then 60 degrees for 1 second before the event is fired, then send 45 (degrees).


max_ang_while_on_scr

Double

The maximal ad angle in relation to the viewport in the viewable impression measurement duration. On every single measurement, the maximum angle from the X, Y, and Z axes will be used for calculating the average. For example, if the ad has a 30 degree angle for 0.5 seconds and then 60 degrees for 0.5 seconds before the event is fired, then send 60 (degrees).


min_ang_while_on_scr

Double

The minimal ad angle in relation to the viewport in the viewable impression measurement duration. On every single measurement, the maximum angle from the X, Y, and Z axes will be used for calculating the average. For example, if the ad has a 30 degree angle for 0.5 seconds and then 60 degrees for 0.5 seconds before the event is fired, then send 30 (degrees).


ad_x_axis

Double

The ad x-coordinate when the event is recorded


ad_y_axis

Double

The ad y-coordinate when the event is recorded


ad_z_axis

Double

The ad z-coordinate when the event is recorded


cam_x_axis

Double

Camera x axis


cam_y_axis

Double

Camera y axis


cam_z_axis

Double

Camera z axis


ad_x_axis_rot

Double

Ad x axis rotation


ad_y_axis_rot

Double

Ad y axis rotation


ad_z_axis_rot

Double

Ad z axis rotation


progress

Double

Represents the video playback progress from 0-100.


imp_start_ts

Long

UTC timestamp based on seconds of the viewable impression start


imp_end_ts

Long

UTC timestamp based on seconds of the viewable impression end


quartile

Double

Numeric value for the highest quartile in which the ad is seen. For example, if a video ad is 12 seconds long, the value is 1 when the video playback reaches 3 seconds.

0 1 2 3 4

device_type

String

String value that represents the type of the device. Valid values includes below:

mobile

tablet

console

desktop

mobile tablet console desktop

device_model

String

The device model name as reported by the operating system


device_man

String

The device manufacturer name as reported by the operating system


os

String

The device operating system name as reported by the operating system


os_ver

String

The device operating system version as reported by the operating system


sdk_name

String

Set to the appropriate SDK that is being called upon


sdk_ver

String

The SDK version, for example, 3.39


bid_id

String

Bid ID as it appears in the bid response (only available for programmatic campaigns)


adv_domain

String

Represents the advertiser domain as it appears, for example, nike.com


ad_unit_type

String

Type of ad unit


start_ts

Long

The ad session start timestamp in the device UTC time


cache_buster

String

Value used for cache-busting


app_store_name

String

The app store name


app_store_id

String

The app store ID of the game


placement_id

String

Placement ID in the publisher platform


order_id

String

The order ID


line_item_id

String

The line item ID


creative_id

String

Creative ID in the publisher platform


ad_ht

Double

Ad creative height in pixels


ad_wd

Double

Ad creative width in pixels


scr_wd

Double

Device screen width in pixels


scr_ht

Double

Device screen height in pixels


game_name

String

Game name


ad_net_id

String

Ad network ID


adv_id

String

Advertiser ID


adv_name

String

Advertiser name


cmp_id

String

Publisher campaign ID


ext_cmp_id

String

IAS campaign ID


pub_id

String

Publisher ID


pub_name

String

Publisher name


country_code

String

Country (ALPHA 2) the impression is served to


state_code

String

State the impression is served to


dma

Integer

DMA the impression is served to


uid

String

Unique event identifier


imp_id

String

Impression ID


bundle_id

String

Bundle ID


ad_server_id

String

The ad server ID the pixel is delivered by


ad_server_name

String

The Adserver name which delivered the pixel


media_type

String

Whether the impression from the tracking pixel is intended for display (d) or video (v) advertising

d v

video_player_state

String

Indicates the video ad is 'autoplayed' or 'clicktoplay'

autoplayed clicktoplay

video_break_pos

Integer

Video placement type:

pre-roll (1)

mid-roll (2)

post-roll (3)

stand-alone (4)

1 2 3 4

auto_refresh_enable

Integer

Whether the auto refresh is activated; 0 (no) or 1 (yes)

0 1

device_id

String

The device ID


is_fraud

Boolean

Whether IAS detected suspicious invalid traffic. If you can't share an IP address directly with IAS, you need to integrate with IAS via IP Suspicious Activity Detection Process and pass IAS the signals via is_fraud.

true false

Required Parameters Per Event

Display

  • R: Required

  • If there isn't an R, do not send that property for the event.

Parameter

load

unload

vimp

event_type

R

R

R

event_time

R

R

R

event_time_zone

R



event_session_id




ad_id

R

R

R

ad_session_id

R

R

R

cum_50pct_inview_dur


R

R

max_cont_50pct_inview_dur


R

R

cum_100pct_inview_dur


R

R

max_cont_100pct_inview_dur


R

R

dwell_dur


R

R

avg_pct_seen_while_on_scr


R

R

avg_pct_seen



R

max_pct_seen_on_scr


R

R

min_pct_seen_on_scr


R

R

avg_on_scr_real_estate


R

R

min_on_scr_real_estate


R

R

max_on_scr_real_estate


R

R

avg_ang_while_on_scr


R

R

max_ang_while_on_scr


R

R

min_ang_while_on_scr


R

R

ad_x_axis



R

ad_y_axis



R

ad_z_axis



R

cam_x_axis



R

cam_y_axis



R

cam_z_axis



R

ad_x_axis_rot



R

ad_y_axis_rot



R

ad_z_axis_rot



R

progress




imp_start_ts

R


R

imp_end_ts


R

R

quartile




device_type

R



device_model




device_man




os

R



os_ver




sdk_name

R



sdk_ver

R



bid_id

R



adv_domain




ad_unit_type

R



start_ts

R



cache_buster




app_store_name

R



app_store_id

R



placement_id




order_id




line_item_id




creative_id




ad_ht

R



ad_wd

R



scr_wd

R



scr_ht

R



game_name

R



ad_net_id

R



adv_id

R

R


adv_name

R

R


cmp_id

R

R


ext_cmp_id

R

R


pub_id

R

R


pub_name

R



country_code

R



state_code




dma




uid

R

R

R

imp_id

R

R

R

bundle_id




ad_server_id




ad_server_name




media_type

R

R

R

device_id

R



is_fraud

R

R

R

Video

  • R: Required

  • If there isn't an R, do not send that property for the event.

Parameter

load

unload

vimp

progress

event_type

R

R

R

R

event_time

R

R

R

R

event_time_zone

R




event_session_id





ad_id

R

R

R

R

ad_session_id

R

R

R

R

cum_50pct_inview_dur


R

R

R

max_cont_50pct_inview_dur


R

R

R

cum_100pct_inview_dur


R

R

R

max_cont_100pct_inview_dur


R

R

R

dwell_dur


R

R

R

avg_pct_seen_while_on_scr


R

R

R

avg_pct_seen



R

R

max_pct_seen_on_scr


R

R

R

min_pct_seen_on_scr


R

R

R

avg_on_scr_real_estate


R

R

R

min_on_scr_real_estate


R

R

R

max_on_scr_real_estate


R

R

R

avg_ang_while_on_scr


R

R

R

max_ang_while_on_scr


R

R

R

min_ang_while_on_scr


R

R

R

ad_x_axis



R

R

ad_y_axis



R

R

ad_z_axis



R

R

cam_x_axis



R

R

cam_y_axis



R

R

cam_z_axis



R

R

ad_x_axis_rot



R

R

ad_y_axis_rot



R

R

ad_z_axis_rot



R

R

progress




R

imp_start_ts

R


R

R

imp_end_ts


R

R

R

quartile




R

device_type

R




device_model





device_man





os

R




os_ver





sdk_name

R




sdk_ver

R




bid_id

R




adv_domain





ad_unit_type

R




start_ts

R




cache_buster





app_store_name

R




app_store_id

R




placement_id





order_id





line_item_id





creative_id





ad_ht

R




ad_wd

R




scr_wd

R




scr_ht

R




game_name

R




ad_net_id

R




adv_id

R

R



adv_name

R

R



cmp_id

R

R



ext_cmp_id

R

R



pub_id

R

R



pub_name

R




country_code

R




state_code





dma





uid

R

R

R

R

imp_id

R

R

R

R

bundle_id





ad_server_id





ad_server_name





media_type

R

R

R

R

video_player_state

R




video_break_pos

R




auto_refresh_enable

R




device_id

R




is_fraud

R

R

R

R

Return Values

Code

Description

200

On success

4xx

User error

5xx

Server error

Sample Curl

Display

Review sample cURL statements below:

Load:

curl https://3denvironments.adsafeprotected.com/v1/gaming/{gaming_partner_name} -H "Content-Type: application/json" -X POST -d '{
"event_type": "load",
"event_time": 1686746113,
"event_time_zone": "UTC",
"event_session_id": "00fb0b2f1128d1492e675e7bd3e951cc9ffbd0b9",
"ad_id": "image.rtb.1728679683418033270",
"ad_session_id": "3",
"imp_start_ts": 1686746187810,
"device_model": "SM-A536U",
"device_man": "samsung",
"device_type": "mobile",
"os": "android",
"os_ver": "13",
"sdk_name": "Example SDK name",
"sdk_ver": "5.08",
"bid_id": "675p2rqwt88tkcj4prb7lkpv",
"adv_domain": "example.com",
"ad_unit_type": "image",
"start_ts": 1686746187810,
"cache_buster": "1686746113",
"app_store_name": "Car Parking: Traffic Jam 3D",
"app_store_id": "com.nostel.parking.car",
"placement_id": "1623056918",
"order_id": "",
"line_item_id": "64623ac2de8395b8f18ab6ef",
"creative_id": "video.rtb.18968405115678136299",
"ad_ht": 480,
"ad_wd": 848,
"scr_wd": 810,
"scr_ht": 1800,
"game_name": "Car Parking: Traffic Jam 3D",
"ad_net_id": "Example net id",
"adv_id": "634eaa841923eb3db9e83957",
"adv_name": "Example adv name",
"cmp_id": "64623ac2de8395b8f18ab6ef_675p2rqwt88tkcj4prb7lkpv",
"ext_cmp_id": "1506980",
"pub_id": "example_id",
"pub_name": "Example pub name",
"country_code": "US",
"state_code": "",
"dma": 551,
"uid": "00fb0b2f1128d1492e675e7bd3e951cc9ffbd0b9_41",
"imp_id": "53d406ec-9110-41ac-8707-68c873b7be1b",
"bundle_id": "com.nostel.parking.car",
"ad_server_id": "634eaa841923eb3db9e83957",
"ad_server_name": "Example server name",
"media_type": "d",
"video_player_state": "",
"video_break_pos": 4,
"auto_refresh_enable": 1,
"device_id": "7f839be0-7d71-45dd-a00b-b5c333143756",
"is_fraud":false
}'

Vimp:

curl https://3denvironments.adsafeprotected.com/v1/gaming/{gaming_partner_name} -H "Content-Type: application/json" -X POST -d '{
"event_type": "vimp",
"event_time": 1686746177,
"event_session_id": "9df9b23622744a476ef017bef87a72abd38c652b",
"ad_id": "image.rtb.1728679683418033270",
"ad_session_id": "12",
"cum_50pct_inview_dur": 1643,
"max_cont_50pct_inview_dur": 1643,
"cum_100pct_inview_dur": 1643,
"max_cont_100pct_inview_dur": 1643,
"dwell_dur": 1643,
"avg_pct_seen_while_on_scr": 0.02425543405115604,
"avg_pct_seen": 1,
"max_pct_seen_on_scr": 1,
"min_pct_seen_on_scr": 1,
"avg_on_scr_real_estate": 0.02425543405115604,
"min_on_scr_real_estate": 0.02425543405115604,
"max_on_scr_real_estate": 0.02425543405115604,
"avg_ang_while_on_scr": 0,
"min_ang_while_on_scr": 0.00012316647917032,
"max_ang_while_on_scr": 0.00012316647917032,
"ad_x_axis": 34,
"ad_y_axis": 34,
"ad_z_axis": 34,
"cam_x_axis": 34,
"cam_y_axis": 34,
"cam_z_axis": 34,
"ad_x_axis_rot": 34,
"ad_y_axis_rot": 34,
"ad_z_axis_rot": 34,
"imp_start_ts": 1686746189,
"imp_end_ts": 1686746190,
"placement_id": "1713878667",
"uid": "9df9b23622744a476ef017bef87a72abd38c652b_88",
"imp_id": "53d406ec-9110-41ac-8707-68c873b7be1b",
"media_type": "d"
}'

Unload:

curl https://3denvironments.adsafeprotected.com/v1/gaming/{gaming_partner_name} -H "Content-Type: application/json" -X POST -d '{
"event_type": "unload",
"event_time": 1686746101,
"event_session_id": "18b3db322c14f6353cb2bfa9afc762c74e7373e4",
"ad_id": "image.rtb.1728679683418033270",
"ad_session_id": "17",
"cum_50pct_inview_dur": 3220,
"max_cont_50pct_inview_dur": 3220,
"cum_100pct_inview_dur": 2211,
"max_cont_100pct_inview_dur": 2211,
"dwell_dur": 3220,
"avg_pct_seen_while_on_scr": 0.0159101096621325,
"avg_on_scr_real_estate": 2,
"max_on_scr_real_estate": 2,
"min_on_scr_real_estate": 1,
"avg_ang_while_on_scr": 34,
"max_pct_seen_on_scr": 0.76621325,
"min_pct_seen_on_scr": 0.16621325,
"max_ang_while_on_scr": 34,
"min_ang_while_on_scr": 34,
"imp_end_ts": 1686746187810,
"placement_id": "4287259876",
"adv_id": "123456",
"adv_name": "advertiser name",
"cmp_id": "123456",
"ext_cmp_id": "123456",
"uid": "123456",
"imp_id": "53d406ec-9110-41ac-8707-68c873b7be1b",
"media_type": "d",
"is_fraud": true
}'

Video

Review sample cURL statements below:

Load:

curl https://3denvironments.adsafeprotected.com/v1/gaming/{gaming_partner_name} -H "Content-Type: application/json" -X POST -d '{
"event_type": "load",
"event_time": 1686746113,
"event_time_zone": "UTC",
"event_session_id": "00fb0b2f1128d1492e675e7bd3e951cc9ffbd0b9",
"ad_id": "image.rtb.1728679683418033270",
"ad_session_id": "3",
"imp_start_ts": 1686746187810,
"device_model": "SM-A536U",
"device_man": "samsung",
"device_type": "mobile",
"os": "android",
"os_ver": "13",
"sdk_name": "Example SDK name",
"sdk_ver": "5.08",
"bid_id": "675p2rqwt88tkcj4prb7lkpv",
"adv_domain": "example.com",
"ad_unit_type": "image",
"start_ts": 1686746187810,
"cache_buster": "1686746113",
"app_store_name": "Car Parking: Traffic Jam 3D",
"app_store_id": "com.nostel.parking.car",
"placement_id": "1623056918",
"order_id": "",
"line_item_id": "64623ac2de8395b8f18ab6ef",
"creative_id": "video.rtb.18968405115678136299",
"ad_ht": 480,
"ad_wd": 848,
"scr_wd": 810,
"scr_ht": 1800,
"game_name": "Car Parking: Traffic Jam 3D",
"ad_net_id": "Example net id",
"adv_id": "634eaa841923eb3db9e83957",
"adv_name": "Example adv name",
"cmp_id": "64623ac2de8395b8f18ab6ef_675p2rqwt88tkcj4prb7lkpv",
"ext_cmp_id": "1506980",
"pub_id": "example_id",
"pub_name": "Example pub name",
"country_code": "US",
"state_code": "",
"dma": 551,
"uid": "00fb0b2f1128d1492e675e7bd3e951cc9ffbd0b9_41",
"imp_id": "53d406ec-9110-41ac-8707-68c873b7be1b",
"bundle_id": "com.nostel.parking.car",
"ad_server_id": "634eaa841923eb3db9e83957",
"ad_server_name": "Example server name",
"media_type": "v",
"video_player_state": "",
"video_break_pos": 4,
"auto_refresh_enable": 1,
"device_id": "7f839be0-7d71-45dd-a00b-b5c333143756",
"is_fraud":false
}'

Unload:

curl https://3denvironments.adsafeprotected.com/v1/gaming/{gaming_partner_name} -H "Content-Type: application/json" -X POST -d '{
"event_type": "unload",
"event_time": 1686746101,
"event_session_id": "18b3db322c14f6353cb2bfa9afc762c74e7373e4",
"ad_id": "image.rtb.1728679683418033270",
"ad_session_id": "17",
"cum_50pct_inview_dur": 3220,
"max_cont_50pct_inview_dur": 3220,
"cum_100pct_inview_dur": 2211,
"max_cont_100pct_inview_dur": 2211,
"dwell_dur": 3220,
"avg_pct_seen_while_on_scr": 0.0159101096621325,
"avg_on_scr_real_estate": 2,
"max_on_scr_real_estate": 2,
"min_on_scr_real_estate": 1,
"avg_ang_while_on_scr": 34,
"max_pct_seen_on_scr": 0.76621325,
"min_pct_seen_on_scr": 0.16621325,
"max_ang_while_on_scr": 34,
"min_ang_while_on_scr": 34,
"imp_end_ts": 1686746187810,
"placement_id": "4287259876",
"adv_id": "123456",
"adv_name": "advertiser name",
"cmp_id": "123456",
"ext_cmp_id": "123456",
"uid": "123456",
"imp_id": "53d406ec-9110-41ac-8707-68c873b7be1b",
"media_type": "v",
"is_fraud": false
}'

Progress:

curl https://3denvironments.adsafeprotected.com/v1/gaming/{gaming_partner_name} -H "Content-Type: application/json" -X POST -d '{
"event_type": "progress",
"event_time": 1686746177,
"event_session_id": "9df9b23622744a476ef017bef87a72abd38c652b",
"ad_id": "image.rtb.1728679683418033270",
"ad_session_id": "12",
"cum_50pct_inview_dur": 1643,
"max_cont_50pct_inview_dur": 1643,
"cum_100pct_inview_dur": 1643,
"max_cont_100pct_inview_dur": 1643,
"dwell_dur": 1643,
"avg_pct_seen_while_on_scr": 0.02425543405115604,
"avg_pct_seen": 1,
"max_pct_seen_on_scr": 1,
"min_pct_seen_on_scr": 1,
"avg_on_scr_real_estate": 0.02425543405115604,
"min_on_scr_real_estate": 0.02425543405115604,
"max_on_scr_real_estate": 0.02425543405115604,
"avg_ang_while_on_scr": 0,
"min_ang_while_on_scr": 0.00012316647917032,
"max_ang_while_on_scr": 0.00012316647917032,
"ad_x_axis": 34,
"ad_y_axis": 34,
"ad_z_axis": 34,
"cam_x_axis": 34,
"cam_y_axis": 34,
"cam_z_axis": 34,
"ad_x_axis_rot": 34,
"ad_y_axis_rot": 34,
"ad_z_axis_rot": 34,
"progress": 50,
"quartile": 2,
"imp_start_ts": 1686746189,
"imp_end_ts": 1686746190,
"placement_id": "1713878667",
"uid": "9df9b23622744a476ef017bef87a72abd38c652b_88",
"imp_id": "53d406ec-9110-41ac-8707-68c873b7be1b",
"media_type": "v"
}'

Was this article helpful?

Need further help?

Create an IAS case with details of your inquiry to receive help from our internal support team.