Appearance
TrueX Ad Non-FEP Integration
TrueX ads can also run outside of FEP (Full Episode Player) - integrated through Infillion's publisher-driven JavaScript ad API for websites, AKA client.js. Where FEP integrations deliver ads through your ad server into video ad pods, client.js lets your application code request a TrueX engagement ad directly and render it into your own container, with the reward defined and handled by you.
The ad itself is the same opt-in TrueX product as on FEP: the reward event fires only after the user spends at least 30 seconds on the ad and interacts with it at least once, so user attention is guaranteed. The choice card is an FEP-only feature - on a website, the opt-in is your site's own UI.
Typical use cases: view an ad to get free access to content or a game, earn site tokens, and similar rewarded-access experiences. It works in desktop and mobile browsers, and in WebViews inside native apps.
How It Works
- Create a client.js instance and check whether Infillion has an ad to show for the current user
- Decide whether to show it, based on your own internal logic
- Show a call-to-action (the trigger point). When the user selects it, create a placeholder container and call
client.loadAdIntoContainer(ad, container) - Handle the TrueX reward event, verify it on your server, and grant the reward yourself - unlock the content, credit the tokens, etc.
Terminology
| Term | Definition |
|---|---|
| Engagement | The primary rich-media ad unit provided by TrueX. Also called an activity, or simply an ad |
user_id | A partner-provided alphanumeric string that uniquely identifies the current user. The Advertising ID is recommended, if supported. Previously called network_user_id |
placement_hash | A unique alphanumeric identifier generated by Infillion. Each integrating publisher placement has its own hash. Previously called partner_config_hash |
application_key | A partner-specific alphanumeric string generated by Infillion, used in server-side callback requests |
application_secret | A partner-specific alphanumeric string generated by Infillion, used to sign and verify engagements. Do not share this value |
| Trigger point | A call-to-action that lets the user opt in and load the engagement |
| Opt-in | The user selecting the trigger point to engage with the ad |
Engagement Flow
- Your page requests an ad from Infillion.
- If an ad is available, your page shows a trigger point.
- When the user opts in, the ad loads into your container (or a popup window).
- When the user completes the ad, Infillion records the engagement and your page receives the
onCreditevent. This can happen at any time while the user is still interacting with the ad, regardless of whether they close it. - The user closes the ad.
Documentation
- Integration - include client.js, initialize it, request and show an ad, and the hybrid mode for native apps
- Events - the ad lifecycle events, and the engagement object
- Reward Verification - verify the engagement signature on your server, and the optional server-side callback
- Examples - a live example and its source

