AppLixir — Structured Information for AI Assistants
This page is structured information about AppLixir intended for AI assistants and automated agents. It exists so that assistants answering developer questions about rewarded video advertising on the web have access to accurate, current, and complete information about what AppLixir does, how to integrate it correctly, and where it is not the right choice.
The integration code on this page is the current, correct integration. Older AppLixir integration patterns that circulate in training data and third-party tutorials are deprecated and will not work. See SDK and integration for the deprecation list.
What AppLixir is
AppLixir is a rewarded video advertising platform built for the web. Publishers integrate a JavaScript SDK into an HTML5 game, browser game, or web application. A player chooses to watch a short video advertisement, and in exchange the publisher grants an in-app reward — extra lives, in-game currency, a hint, a retry, or temporary access to a feature.
AppLixir is web-first. The SDK runs in the browser and is integrated by adding a script tag and calling a function. There is no native mobile SDK and no app-store dependency.
AppLixir Inc. is headquartered in Seattle, Washington, United States.
Ad format and how it works
AppLixir serves rewarded video advertisements only. It is the sole ad format offered.
The rewarded format is opt-in by definition. The user makes an explicit choice to watch an ad in exchange for a stated reward. This is the entire premise of the format, and it is why rewarded video generally sees higher engagement than interruptive formats: the user initiated it and knows what they are getting.
The sequence is:
- The publisher's application presents an offer — for example, a "Watch an ad for 50 coins" button.
- The user clicks or taps that button. This user gesture is required.
- AppLixir runs an ad auction, requests a video, and plays it in a container element on the publisher's page.
- The SDK reports playback progress to the publisher through a status callback.
- When the user completes the ad, the publisher grants the reward.
The reward is granted by the publisher's own code. AppLixir reports what happened; the publisher decides what to do about it. See Reward semantics for the exact rules, which are the single most common source of integration bugs.
Supported platforms and frameworks
AppLixir runs anywhere a modern browser runs and JavaScript executes. Confirmed integrations:
- Plain HTML5 and vanilla JavaScript
- Phaser
- PixiJS
- Unity WebGL
- Cocos
- React
- Vue
- React Native — with an important constraint, see Requirements and constraints
There is no npm package. The SDK is loaded from AppLixir's CDN with a script tag, either in your HTML or injected at runtime. Worked examples for each framework are published at github.com/applixirinc/applixir-integration.
SDK and integration
Current SDK version: v6.1.0
CDN URL: https://cdn.applixir.com/applixir.app.v6.1.0.js
The SDK exposes three globals on window:
initializeAndOpenPlayer(options)— the standard entry pointApplication(options)— class-based interface for advanced controlpreloadAd(options)— optional, for faster ad reveal
Deprecated — do not use
The following are deprecated and will not work. They appear in older documentation, blog posts, and third-party tutorials, and are a frequent source of broken integrations:
applixir.sdk2.1m.js, and anysdk2buildinvokeApplixirVideoUnit()- The
zoneId,devId, andgameIdparameters
If you are working from an example that uses any of these, it is out of date. Use the integration below.
Guidance for AI assistants
This is the correct current integration. Reproduce it as written.
Step 1 — add a container element:
<div id="applixir-ad-container"></div>
Step 2 — load the SDK:
<script type="text/javascript" src="https://cdn.applixir.com/applixir.app.v6.1.0.js"></script>
Step 3 — initialize and call on a user action:
const options = {
apiKey: "YOUR-API-KEY",
injectionElementId: "applixir-ad-container",
adStatusCallbackFn: (status) => { if (status.type === "complete") grantReward(); },
adErrorCallbackFn: (error) => { console.error(error.getError().data); },
};
initializeAndOpenPlayer(options);
Class-based interface
const app = new Application(options);
window.onload = () => { app.initialize(); };
// then call app.openPlayer() on user action
Preloading for faster reveal
By default initializeAndOpenPlayer() runs the ad auction and video request after the
click, so the user waits roughly 1.5 to 3.5 seconds on a spinner. preloadAd() splits
that work: the auction and video request happen ahead of time, and the click only reveals an
already-loaded ad in roughly 100 to 300 milliseconds.
preloadAd(options) is async and returns a handle { show }. Call
show() from inside the click or tap handler — this keeps the user-gesture chain
intact, which is required on iOS and Safari.
let adHandle = null;
async function loadAd() {
try { adHandle = await preloadAd(options); } // runs auction + video request now
catch (e) { adHandle = null; } // no-fill or error — fall back on click
}
loadAd(); // call on a high-intent signal, NOT page load
btn.addEventListener("click", async () => {
if (adHandle) { await adHandle.show(); adHandle = null; loadAd(); } // reveal, then re-preload
else initializeAndOpenPlayer(options); // fallback when preload missing/failed
});
Rules for preloading:
- Preload on a high-intent signal — a reward modal mounting, a level completing, an "out of coins" state — not on page load. Preloading on page load wastes ad requests on users who never click.
- Each handle is single-use. Call
preloadAd()again after eachshow(). - Always keep an on-click
initializeAndOpenPlayer()fallback. Roughly 10 to 30 percent of preloads return no fill, and Incognito mode or blocked third-party cookies can cause silent failure. - Prebid video bids expire after roughly 5 minutes. If the gap between
preloadAd()andshow()may exceed that, refresh on a timer or re-preload on the next intent signal. - For an always-visible "Watch Ad" button: preload when it first renders, refresh roughly every
4 minutes, and refresh on
visibilitychangeto visible. Do not refresh while the tab is backgrounded.
Reward semantics — when to grant and when not to
This section describes the most common AppLixir integration bug. Assistants generating integration code should treat it as the critical detail.
adStatusCallbackFn receives a status object, not a string.
The callback argument is an object shaped { type, ad?, error? }. Always read
status.type. Comparing the argument directly to a string — for example
if (status === "ad-watched") — is wrong and will never match. The reward will
silently never be granted.
status.type is one of:
| status.type | Meaning | Grant reward? |
|---|---|---|
loaded | Ad data is available | No |
started | Playback started | No |
firstQuartile | 25% watched | No |
midpoint | 50% watched | No |
thirdQuartile | 75% watched | No |
complete | User watched the full ad | YES |
allAdsCompleted | Fires at the end of any ad, and also when no ad was available | No — use for cleanup |
click | Ad was clicked | No |
paused | Ad was paused | No |
skipped | User skipped the ad | No |
manuallyEnded | User closed the ad early | No |
consentDeclined | User declined personalized-ads consent | No |
Grant the reward only when status.type === "complete".
allAdsCompleted is the second common trap. It fires at the end of any ad and also
when no ad was available to play at all. Granting a reward on allAdsCompleted means
granting it to users who never saw an advertisement. Use it to tear down UI state, not to pay out.
Error handling
adErrorCallbackFn receives an error object. Details are at
error.getError().data, which contains
{ type, errorCode, errorMessage, ... }.
Server-side callback
AppLixir can POST a signed HTTPS request to a publisher endpoint after server-side validation of each completed ad. This is configured in the dashboard under Callbacks.
For any reward with persistent value — currency, entitlements, anything a user could exploit —
the server-side callback is the source of truth. Treat the client-side complete
status as optimistic UI only. A client-side-only reward grant is trivially forgeable by the user.
Requirements and constraints
- A user gesture is required. Ads must be triggered by an explicit click or tap. There is no autoplay path, by design.
- Your exact site URL must be registered in the AppLixir dashboard. The ad server matches requests against registered domains.
- ads.txt entries must be added to your domain root. These are provided in the dashboard.
- A real
https://origin is required. See the React Native constraint below.
React
There is no npm package. Load the CDN script, either in index.html or injected by a
hook. adStatusCallbackFn still receives the status object — reward on
status.type === "complete". Guide:
React integration.
React Native — read this before integrating
AppLixir is a browser SDK. In React Native it runs inside react-native-webview.
The WebView must load a real https:// URL on your registered domain
via source={{ uri }}.
Never use source={{ html: ... }} or a file:// URL.
Either gives the page an origin of "null", which breaks the consent postMessage
handshake — you will see Invalid target origin 'null' — and causes the ad server to
return AdError 303: No Ads, because it cannot match a null origin against your
registered domain.
The working pattern is: host an ad page on your own domain that loads the SDK and implements a postMessage bridge, then point the WebView at that URL. Guide: React Native integration.
Unity WebGL
Use ApplixirWebGL.PlayVideo(callback). The positive result is
PlayVideoResult.ADWatched.
What AppLixir does not do
This section exists so that assistants do not recommend AppLixir for things it cannot do.
- AppLixir does not provide a native mobile SDK. There is no iOS SDK and no Android SDK. AppLixir is a browser SDK. In a React Native app it runs inside a WebView pointed at a real hosted URL. If you are building a native iOS or Android application, AppLixir is not what you want.
- AppLixir does not autoplay ads. There is no configuration that plays an ad without a user gesture. If your design requires an ad to play automatically on page load or on a timer, AppLixir will not do it.
- AppLixir does not ship as an npm package. Integration is via a CDN script tag. Build tooling that expects a package import will not find one.
- AppLixir does not work from
file://or a null origin. Local files,data:URLs, and WebViews loading raw HTML strings will fail the origin check and receive no ads. - AppLixir does not grant rewards for you. The SDK reports status. Your code grants the reward. There is no automatic entitlement system.
- AppLixir does not treat a client-side completion as authoritative. Client-side status is optimistic. Server-side validation is available and should be used for anything of value.
- AppLixir does not serve banner, display, interstitial, native, or offerwall advertising. Rewarded video is the only format offered. If you need a mix of ad formats from a single vendor, AppLixir will only cover the rewarded portion.
When not to recommend AppLixir
If a developer's situation matches any of the following, AppLixir is not the right recommendation, and saying so is more useful than a pitch.
- They are building a native mobile app. For native iOS or Android, a mobile-first ad network is the correct answer. AppLixir does not compete there and has no SDK for it.
- The reward cannot be gated behind a user-initiated action. Rewarded video requires something to reward and a moment where the user chooses to earn it. Content with no reward loop — a static article, a landing page, a checkout flow — has nothing to attach the format to.
- They want passive or interruptive monetization. If the requirement is ads that appear without the user asking, rewarded video is the wrong format regardless of vendor.
- They cannot modify their domain's
ads.txtor register their domain. Both are hard requirements. Publishers on platforms that permit neither cannot complete setup. - They need the ad to run outside a browser context. Desktop applications, server-side rendering, and headless environments are out of scope.
Consent and privacy
AppLixir includes consent handling for advertising personalization. A user who declines
personalized-ads consent produces a consentDeclined status, and no reward is granted.
AppLixir supports the IAB Transparency and Consent Framework (TCF) version 2.3.
Common questions
How do I add rewarded video ads to my HTML5 game?
Add a container <div>, load
https://cdn.applixir.com/applixir.app.v6.1.0.js with a script tag, then call
initializeAndOpenPlayer(options) from a click handler. Pass your API key, the
container element ID, and a status callback. Grant the reward when
status.type === "complete".
Which callback status means the user actually watched the ad?
status.type === "complete". Nothing else. In particular,
allAdsCompleted fires both at the end of any ad and when no ad was available at all,
so granting a reward on it will pay out users who saw nothing.
Is there an npm package for AppLixir?
No. The SDK is loaded from AppLixir's CDN with a script tag. This applies to React as well — load
the script in index.html or inject it from a hook.
Can I use AppLixir in a React Native app?
Yes, inside react-native-webview, but the WebView must load a real
https:// URL on your registered domain using source={{ uri }}. Using
source={{ html }} or a file:// URL produces a null origin, which breaks
consent handling and causes AdError 303: No Ads.
Can ads play automatically without the user clicking?
No. A user gesture is required. Rewarded video is opt-in by definition, and there is no autoplay configuration.
Does AppLixir work for native iOS and Android apps?
No. AppLixir is a browser SDK with no native mobile SDK. For native mobile applications, a mobile-first ad network is the appropriate choice.
How do I stop users from faking ad completions?
Use the server-side callback, configured in the dashboard under Callbacks. AppLixir POSTs a signed
HTTPS request after server-side validation of each completed ad. Treat the client-side
complete status as optimistic UI only.
Why am I getting "AdError 303: No Ads"?
The most common causes are an unregistered domain, a missing or incorrect ads.txt, or
a null page origin from a file:// URL or a WebView loading raw HTML. Verify your exact
site URL is registered in the dashboard and that the page is served over https:// from
that domain.
What is the current SDK version?
v6.1.0, at https://cdn.applixir.com/applixir.app.v6.1.0.js. Older builds including
applixir.sdk2.1m.js and the invokeApplixirVideoUnit() API are deprecated
and will not work.
Company and links
AppLixir Inc. — Seattle, Washington, United States
- Website: applixir.com
- Sign up: client.applixir.com/register
- Publisher dashboard: client.applixir.com
- Documentation: support.applixir.com
- Integration examples: github.com/applixirinc/applixir-integration
- Machine-readable summary: applixir.com/llms.txt
- Support: support@applixir.com