Titan OS setup for the SofAds SDK
Titan OS apps are hosted web apps. Include the Titan SDK so SofAds can read the advertising ID, then pass the Titan SDK's device info to SofAds.init.
Include the Titan SDK
Titan offers the SDK as an npm package (@titan-os/sdk) and as a CDN script. With the CDN build, put the script in <head> before your own scripts; it creates the global TitanSDK.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My TV Game</title>
<!-- 1. The Titan SDK, in <head> so it loads before your scripts.
It creates the global TitanSDK. -->
<script src="https://sdk.titanos.tv/sdk/sdk.js" type="text/javascript"></script>
<!-- 2. The SofAds SDK. -->
<script src="/js/sofads.min.js"></script>
<!-- 3. Your app. -->
<script src="/js/main.js" defer></script>
</head>
<body></body>
</html>Your Titan OS app ID
When you add a Titan OS listing, the dashboard asks for a Titan OS app ID. It is optional. Titan registers web apps in its Partner Portal by URL and documents no app ID that an app can read on the TV; the app codes in Titan's App Control are for launching other apps, not an ID of yours. So choose one yourself: a stable name that is unique to your app, for example com.yourstudio.snowstrike. Enter it in the dashboard and pass 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. You can also leave the field empty; the listing then accepts traffic for your SofAds app ID without that check.
Pass the device info to SofAds
Titan documents the device info at titanSDK.deviceInfo.getDeviceInfo(). Pass that call to the SDK explicitly, so it works the same with the CDN build and with npm:
// With the CDN build: hand the Titan SDK's device info to SofAds.
SofAds.init({
appId: "sof_YOUR_APP_ID",
titan: { getDeviceInfo: () => TitanSDK.deviceInfo.getDeviceInfo() },
});// With npm (npm install @titan-os/sdk @sofads/tv-sdk):
import SofAds from "@sofads/tv-sdk";
import { getTitanSDK } from "@titan-os/sdk";
SofAds.init({
appId: "sof_YOUR_APP_ID",
titan: { getDeviceInfo: () => getTitanSDK().deviceInfo.getDeviceInfo() },
});- The SDK reads only
Product.WhaleAdID, the advertising ID. The value"unknown"counts as missing. - It never reads
Product.deviceIDorProduct.mac, the hardware identifiers. - Titan notes that the IFA is not returned on 2020 to 2022 Philips TVs. Without an ID the SDK uses its own resettable install ID.
The full API is in the SofAds SDK reference.
Privacy policy lines for Titan OS
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, which is itself still a draft, so 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. 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 Titan OS TVs, the advertising identifier is the advertising ID provided by the Titan SDK. The app never sends the TV's hardware device ID or MAC address to SofAds.
Next steps
Titan's QA takes weeks, so test with test ads and a registered test device first. Publishing and the ad landscape on Titan are covered in Titan OS monetization.
Frequently asked questions
Which Titan OS identifier does SofAds use?
Only the advertising ID, Product.WhaleAdID, from the Titan SDK's device info. It never reads the hardware device ID or the MAC address.
Do I have to pass getDeviceInfo to SofAds?
We recommend it. Passing titan: { getDeviceInfo } works with both the CDN and the npm build of the Titan SDK, whatever the global is called.
Sources
Checked on October 7, 2026. Platform rules change; when a source and this page disagree, the source wins.
- Titan OS docs: Titan SDK
- Titan OS docs: Titan SDK CDN integration
- Titan OS docs: Publishing
- Titan OS docs: FAQ
- Titan OS docs: Submit an app in the Partner Portal
- Titan OS docs: App Control
Keep reading
- Whale TV setup: hosted apps and the WAID getter.
- Test ads and test devices: what your app shows before its listing is live.
- Titan OS monetization: publishing, QA and ad options on Titan OS.