Skip to main content
RevIQ works in any desktop app that renders its UI with web technology. If your app shows HTML in a window, you can monetize it with RevIQ.

Supported frameworks

  • Electron, with first-class support through the rev-utils helper (see below)
  • Tauri
  • NW.js, CEF, Wails, Neutralino and other Chromium- or webview-based frameworks
  • Native apps with an embedded webview: WebView2 (Windows), WKWebView (macOS) and WebKitGTK (Linux)
Add the RevIQ script to the page your app loads, the same way you would on a website. See Frontend. Then make sure your app meets the two desktop requirements below.

Desktop requirements

  1. Open ad clicks in the user’s default browser. When someone clicks an ad, open the landing page in their default browser rather than navigating your app’s window. Only open links in response to a real click. Block navigations and popups the user didn’t trigger, and block file downloads started by ads.
  2. Send a standard browser User Agent. Many frameworks add their own name, and your app’s name, to the User Agent string (for example Electron/… or MyApp/…). Remove those parts so the string looks like a regular browser. Non-standard User Agents may be flagged as IVT (invalid traffic).

Electron

rev-utils handles both requirements for you.

Installation

Install the rev-utils library to augment your Electron setup with full compatibility for ads. We may occasionally update the package.

Usage

After creating a window with new BrowserWindow, pass the window and the electron global into setupRevUtils.
main.js
Under the hood, setupRevUtils calls two functions on the window
  • setupLinkHandler to open ads (and block malicious behavior!)
  • setUserAgent, which removes non-standard portions of the User Agent string which may trigger IVT (invalid traffic).

Tauri

Build a page on your domain with the RevIQ script and your ad slots (see Frontend), then show it in a child webview that sends a standard User Agent and opens ad clicks in the user’s browser.
src-tauri/src/ads.rs
Window::add_child is behind Tauri’s unstable feature. Enable it on tauri in src-tauri/Cargo.toml: tauri = { version = "2", features = ["unstable"] }.
The webview runs this script in every frame. Ads render inside iframes, so each frame reports clicks and passes links up to your page, which opens them only right after a real click.
src-tauri/src/ads-init.js
Register the opener plugin and the command:
src-tauri/src/main.rs
Because the ad page is loaded from your domain (remote content), Tauri blocks it from calling commands unless a capability opts that origin in. Grant the ads webview only the one command it needs:
src-tauri/capabilities/ads.json
Define that permission for your command:
src-tauri/permissions/open-ad-link.toml
On Windows, set the ads webview’s tracking prevention level to none: call ICoreWebView2Profile3::SetPreferredTrackingPreventionLevel with COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_NONE through with_webview. WebView2 otherwise blocks the cookies bidders use to recognize returning users, which lowers bids.

Other frameworks

Meet the two requirements with your framework’s own APIs: set a standard browser User Agent on the webview, and send link clicks and window.open calls from ad frames to the system browser, only right after a real click. The Tauri example above shows the full pattern.
Building with a framework not listed here? It will work as long as it renders web content. Contact your RevIQ account manager if you need help with setup.