Whale TV setup for the SofAds SDK
Whale TV apps are hosted web apps, so there is no package manifest to edit. Load the SDK from your own server and call SofAds.init. The SDK reads Whale's advertising ID itself.
Load the SDK
Whale says apps don't need vendor-specific JavaScript libraries. Serve sofads.min.js from your own domain next to your app, or reference a pinned version such as https://sdk.sofadsrv.com/sdk/v1.0.0/sofads.min.js (never an unversioned "latest" URL).
<!-- index.html on your server -->
<script src="/js/sofads.min.js"></script>
<script>
SofAds.init({
appId: "sof_YOUR_APP_ID",
});
</script>The full API is in the SofAds SDK reference.
Your Whale TV app ID
When you add a Whale TV listing, the dashboard asks for a Whale TV app ID. It is optional. Whale apps are hosted web apps without a manifest, and Whale's developer docs define no app ID that an app can read on the TV, so the SDK can't detect one. You choose the value and pass it yourself:
- If Whale has given your app a store number, use it. Whale's ad macros call it the bundle ID, and it is the last part of the store URL, for example
20008274inhttps://www.whaletv.com/apps/20008274. - Otherwise use any stable name that is unique to your app, for example
com.yourstudio.snowstrike.
Enter it in the dashboard and pass exactly the same value to the SDK:
SofAds.init({
appId: "sof_YOUR_APP_ID",
nativeAppId: "com.yourstudio.snowstrike", // the ID you entered in the dashboard
});A listing with an ID only accepts traffic that reports that ID, so keep it the same in every release.
The Whale advertising ID (WAID)
The SDK reads the WAID itself, so you don't have to write any code for it. It looks in three places, in this order:
- Your own getter, if you pass one:
whale: { getAdId }may return the ID,nullor a promise. - Whale's Device Info API. The SDK reads
DeviceInfo.Product.WhaleAdID. If your page doesn't already load Whale's device info script (zeasn_deviceInfo_sdk.js), the SDK adds it. Off a certified Whale TV the value is"unknown", which the SDK treats as missing. - The
WhaleADIDcookie that Whale's player SDK (whaleplayer-sdk.js) keeps on your domain, if your app uses that player.
Whatever it finds is sent as waid. When none of the three gives an ID, the SDK uses its own resettable install ID and sends it as ppid. The SDK never reads the hardware ID (Product.deviceID).
If you don't want the SDK to add Whale's script to your page, turn that off. The SDK then only uses what your page already has:
SofAds.init({
appId: "sof_YOUR_APP_ID",
whale: { deviceInfoScript: false },
});The SDK also reads the TV's maker, model and firmware from the user agent, so your stats show them without extra setup.
Whale says you need cookies to identify a device. The SDK stores its install ID in localStorage, with a cookie as fallback, so keep both enabled for your app.
Privacy policy lines for Whale TV
Your app's privacy policy has to say that it shows ads and what data that involves. Copy these lines into it and adapt them to your app. They match the SofAds privacy policy. Treat the wording as a template and have it reviewed for your app; it is not legal advice.
This app shows ads from SofAds. To choose, show and measure ads, the app sends SofAds information about the app and the TV (platform, manufacturer, model, operating system version, screen size and language), your IP address, your consent choices and an advertising identifier where your choices allow it. For some ad partners the TV requests the ad directly from that partner, which then also receives your IP address. If this app has no consent screen of its own and you are in the EEA, the UK or Switzerland, the SofAds consent screen asks for your choice when the app starts; you can change it later in the app. Where no TV advertising identifier is available or allowed, SofAds uses a random install ID stored by this app, which you can reset in the app's privacy settings. SofAds privacy policy: https://sofads.com/privacy/
On Whale TV, the advertising identifier is the Whale advertising ID (WAID), when the app can read it. You can reset or limit it in the TV's settings.
Next steps
Before the listing is live your app gets test ads. Whale's ad program and revenue models are covered in Whale TV monetization.
Frequently asked questions
Does Whale TV need a special library for SofAds?
No. You only load sofads.min.js and call SofAds.init. The SDK adds Whale's small device info script itself to read the advertising ID.
What happens without the WAID?
Ads still work. The SDK uses its own random install ID, which the user can reset, and sends it as ppid.
Sources
Checked on November 16, 2026. Platform rules change; when a source and this page disagree, the source wins.
- Whale TV Partner Portal: Development
- Whale TV Partner Portal: Advertising
- Whale TV Partner Portal: Ad macros
- Whale TV Partner Portal: Device Info API
- Whale TV Partner Portal: How to identify a Smart TV platform
Keep reading
- Titan OS setup: the Titan SDK include and device info.
- Test ads and test devices: what your app shows before its listing is live.
- Whale TV monetization: Whale's ad program, WAID macros and open questions.