Skip to content
Nitx Developers

Publisher SDKs

Show Nitx ads on your website or in your app. Every SDK implements the same protocol, so slots, consent, identity and reporting behave the same on every platform.

5 platforms
Consent-first personalization

Choose your platform

Android and iOS are native implementations. React Native and Flutter are thin bridges over them, so behavior is identical.

Web SDK

JavaScript · Browser SDK

A script tag that renders Nitx ad slots on any website, with consent-first personalization.

Script tag<script async src="https://cdn-new.nitx.app/sdk/publisher/v1.js"></script>
ES2018
~8 KB gzipped
Zero dependencies
Read the guide
Android SDK

Kotlin · Native SDK

Native Kotlin library for banner, interstitial, app open and native ads.

Gradleimplementation("io.nitx:publisher:1.0.0")
minSdk 24
No third-party networking
Read the guide
iOS SDK

Swift · Native SDK

Swift package with native rendering, App Tracking Transparency support and a privacy manifest.

Swift Package Manager.package(url: "https://github.com/NitxTech/nitx-publisher-sdk-ios.git", from: "1.0.0")
iOS 15+
Swift 5.9
No dependencies
Read the guide
React Native SDK

TypeScript · Bridge over the native SDKs

TypeScript bridge over the native Android and iOS SDKs, with banner and native ad components.

npmnpm install @nitx/publisher-react-native
React Native 0.75+
Android minSdk 24
iOS 15+
Read the guide
Flutter SDK

Dart · Bridge over the native SDKs

Dart plugin over the native SDKs, with banner widgets and native ad views.

pubspec.yamlnitx_publisher:
Flutter 3.22+
Dart 3.13+
Android minSdk 24 · iOS 15
Read the guide

Building your own client?

The protocol reference documents the endpoints, payloads and storage every SDK uses.

Protocol reference

From dashboard to first ad

  1. 1

    Register your website or app

    Add it in the Nitx Publisher dashboard to get a source code: PUB-AM-XXXXXX for a website, SDK-AM-XXXXX for an app, one per platform.

  2. 2

    Create slots

    Each placement is a slot with a code (SLOT-XXXXXX) and a format: a size such as 300x250 on the web, or a kind such as banner_320x50, interstitial or native in apps.

  3. 3

    Start the SDK

    Start it with your source code and place your slots. The first start verifies the source in the dashboard; after that the SDK loads and renders ads on its own.

What each SDK can show

A slot's format decides how it renders. Web slots are sized; app slots name a kind.

  • Display slot

    WIDTHxHEIGHT

    • Web
  • Banner

    banner_320x50 · banner_300x250 · banner_adaptive

    • Android
    • iOS
    • React Native
    • Flutter
  • Interstitial

    interstitial

    • Android
    • iOS
    • React Native
    • Flutter
  • App open

    app_open

    • Android
    • iOS
    • React Native
    • Flutter
  • Native

    native

    • Android
    • iOS
    • React Native
    • Flutter
  • Rewarded

    rewarded

    • Android
      v2
    • iOS
      v2
    • React Native
      v2
    • Flutter
      v2
  • Creatives

    Web
    Image, video, HTML
    Android
    Image, video, HTML
    iOS
    Image, video*
    React Native
    From the native SDK
    Flutter
    From the native SDK

* The iOS SDK does not render HTML creatives in v1. Rewarded ads have a stable API on every platform and arrive in v2.

The same calls on every platform

Learn it once. Names, arguments and behavior match across the SDKs; only the syntax follows each language.

  • Start

    Once, early, with your source code.

    nitx('init', 'PUB-AM-XXXXXX')
  • Consent

    From your own consent UI.

    nitx('consent', true)
  • Identify

    Normalized and hashed at once.

    nitx('identify', { email: user.email })
  • Forget

    Wipes the visitor; asks the backend to delete it.

    nitx('reset')
  • Screen name

    Sent as context with the next requests.

    Not needed: the web SDK reads the page context itself.
  • Inspect

    Mode, counters, consent and visitor id.

    window.__nitxPublisher.state()

Collect-only today, personalized when you're ready

The backend switches each source to personalized serving. The SDK follows on its own: no release, no code change.

Default

Collect-only

  • Creatives come from the public show-by-code endpoints, one request per slot.
  • Nothing personal travels: no visitor id, no cookies, no query parameters.
  • Consent and identity are collected on the device until personalized serving is on.
When the backend advertises it

Personalized

  • One request per batch of slots, with the visitor and context blocks.
  • Impression and viewable events, batched every 2 seconds.
  • A 404, 405 or 501 falls back to GET mode for the rest of the page load or app process.
Protocol referenceEndpoints, payloads, storage and the mobile API in one place.ChangelogWhat changed in each SDK, newest first.Help CenterGuides and support from the Nitx team.