List of macros
This article describes our macro definition and how to use it with WhaleAds SDK. Below is a list of macros which can be used to replace it values in ad request.
Type: APP
Macro name | Description | Value |
[tv_domain] | TV Domain info where the ad requests are from; | zeasn.tv; corio.com; etc. |
[app_name] | The application name which sends ad requests; | WhaleLive, PhilipsSmartTVPortal, AOCSmartTVPortal, etc. |
[bundle_id] | The application ID based on IAB spec; | 20006184, etc. |
[app_store_url] | The application store URL based on IAB spec; | Ex: https://www.zeasn.tv/whaleeco/appstore/detail?appid=20006184 |
[src_page_url] | The page URL | |
[player_height] | For video ads the page needs to specify the height of the player | 1920 |
[player_width] | For video ads the page needs to specify the width of the player | 1080 |
[placement] | placement of video, integer | 1 (In-Stream) 2 (In-Banner) 3 (In-Article) 4 (In-Feed) 5 (Interstitial/Slider/Floating) |
Type: Content
Macro name | Description | Value |
[provider_id] | The unique ID of content provider within WhaleLive | > SkuffTV, BabyBus, etc. |
[channel_no] | Provide the channel No of WhaleLive to advertiser | 1020,2081,5065,……, only for WhaleLive; |
[channel_category] | Provide the channel category of WhaleLive to advertiser | Sports, Kids, Music, etc, only for WhaleLive; |
[channel_name] | Provide the channel name of WhaleLive to advertiser | The boat show, Qello TV, Karaoke, etc. |
[iab_category] | Provide the IAB category of channel or avod to advertiser | IAB1,IAB7,IAB9-1,etc |
[avod_id] | The unique video ID within content provider’s library | |
[avod_genre] | The content category of WhaleLive, which is mapped from content provider’s category within recommendation system | Sports, Kids, Games, etc; |
[avod_title] | The content title of video from content provider | The Lion King, etc; |
[oriented_age] | Oriented age range of the channel | A12: <12; A18:12-18;A35:18-35; A55: 35-55;A99: > 55; |
[oriented_gender] | Oriented gender of the channel | 0-Female, 1-Male, 2-(Empty) |
[ssai_vendor] | The vendor to insert video ads into streaming | Nowtilus, Amagi, Wurl, Publica,OTTera, etc |
Type: Device
Macro name | Description | Value |
[whale_ad_id] | Device's unique resettable ID; UUID format;The UUID standard contains 32 hexadecimal characters presented in the format 8-4-4-4-12. | Get from Zeasn Device API or read from cookie |
[tv_brand] | TV's brand info | ex: Philips, AOC, TCL,Haier, etc. |
[cntry] | TV Installation country | ALPHA-2 code of country, eg: DE;NL;FR |
[geo_ip_country] | Geography country based on Public IP | ALPHA-2 code of country, eg: DE;NL;FR |
[platform_id] | TV firmware ID | TPM176L000001;TPM186E000001; |
[device_user_agent] | The user agent present on the device | will be used if SSAI |
[device_ip_address] | The public IP address | will be used if SSAI |
[menu_language] | The TV menu language which consumers chosedENG, CHN, etc. | This one will be used for targeting purpose; |
[time_zone] | The difference, in minutes, between date as evaluated in the UTC time zone, and date as evaluated in the local time zone | -720(UTC+12) ~ 720(UTC-12) |
Type: GDPR
Macro name | Description | Value |
[whale_gdpr] | Used by the callee to determine whether an identifier cookie or other personal data can be set and/or used. If not present, callee should do geoIP lookup, and GDPR applies for EU IP addresses | 0: No 1: Yes |
[whale_gdpr_consent] | Has the user consented to information sharing under GDPR | 0: No 1: Yes 2: (legitimate interest), or Full IAB consent string |
[relevant_ads] | Whether consumers accept TOU to delivery ads; it is the same meaning of Limit ad tracking. | 0: Enable targeting ads and meansurement; 1: Disable ad tracking and measurement. |
[device_dnt] | Standard “Do Not Track” flag as set in the header by the browser | where 0 = tracking is unrestricted, 1 = do not track. |
[device_lmt] | Limits tracking in CTV | 0: does not obfuscate the user ip in outgoing requests |
[privacy_policy] | Indicates if the app has a privacy policy | where 0 = no, 1 = yes |
Type: Generic
Macro name | Description | Value |
[rnd] | random number | |
[timestamp] | Current timestamp as random number | |
[ad_sdk_ver] | WhaleAds SDK version | 1.3.3.1, etc |
[google_pal] | nonceString generated from manager.getNonce() | empty; |
Method to pass Macro values to the WhaleAds SDK
Method Name: adMacroParams |
Parameters: adMacroParamValues type: Javascript Object |
Usage: var adMacroParamValues = {platform_id:"value",bundle_id:"value",whale_gdpr:"value"} SmartTV_VideoBanner.adMacroParams(adMacroParamValues) |