Skip to content
NewPublisher SDKs for 5 platforms

Build on Nitx

SDKs, APIs and tools for integrating with Nitx. Start with the Publisher SDKs: one protocol to show Nitx ads on your website and in your apps.

Get started
index.htmlHTMLGuide
<head>
  <!-- Nitx Publisher Tag, printed by your dashboard -->
  <script>
    (function(n,i,t,x){ /* loads v1.js */ })(window,document,'nitx');
    nitx('init', 'PUB-AM-XXXXXX');
  </script>
</head>
<body>
  <article>…</article>
  <div class="nitx-ad"
       data-slot="SLOT-XXXXXX"
       data-size="300x250"></div>
</body>

Events

  • data-nitx-state="loading"
  • data-nitx-state="rendered"
platforms
5
Web, Android, iOS, React Native and Flutter
protocol
1
The same commands and wire format everywhere
web SDK
~8 KB
Gzipped, ES2018, zero runtime dependencies
on device
SHA-256
Email and phone never leave in the clear

Live in three steps

Install, start, show an ad. Every SDK starts with the source code from your Nitx Publisher dashboard.

Install tag
HTML
<!-- Nitx Publisher Tag -->
<script>
  (function(n,i,t,x){
    n['NitxPublisher']=t;
    n[t]=n[t]||function(){(n[t].q=n[t].q||[]).push(arguments)};
    var s=i.createElement('script');s.async=1;
    s.src='https://cdn-new.nitx.app/sdk/publisher/v1.js';
    i.head.appendChild(s);
  })(window,document,'nitx');
  nitx('init', 'PUB-AM-XXXXXX');
</script>
Slot markup
HTML
<div class="nitx-ad" data-slot="SLOT-XXXXXX" data-size="300x250"></div>
Personalization
HTML
<script>
  nitx('init', 'PUB-AM-XXXXXX');
  // From your own consent banner:
  nitx('consent', true);
  // After a login or sign-up, only with the user's consent:
  nitx('identify', { email: user.email, phone: user.phone, gender: user.gender, birth_year: user.birthYear, city: user.city, country: user.country, traits: { plan: user.plan } });
  // On logout or when the user asks to be forgotten:
  nitx('reset');
</script>

Every format, rendered natively

Image, video and HTML creatives in views the SDK sizes for you. Slot kinds come from the dashboard, so the code stays the same.

Display slot

One element per placement, rendered in a sandboxed iframe. Slots added later are picked up automatically.

WIDTHxHEIGHT

Banner

An inline view the app places in its layout. Adaptive banners take the full width at 50 to 90 dp.

banner_320x50banner_300x250banner_adaptive

Interstitial

Full screen at a natural break, with a close control. Image or video, portrait or landscape.

interstitial

App open

Full screen when the app launches or returns to the foreground, with a frequency rule.

app_open

Native

Rendered with your own UI, as a post, card or row. The SDK supplies the assets and tracks the view.

native

Rewarded

v2

Full-screen video the user opts into for a reward. Defined now so the taxonomy is stable.

rewarded

Personalization your users can trust

The same rules ship in every SDK and are enforced on the device, not left to each integration.

  • Consent firstIdentity, the consent record and location leave only after your own consent UI says yes. The SDKs show no banner of their own.
  • No scrapingThe SDKs never read your forms, inputs or cookies. Identity enters only through identify.
  • Hashes onlyRaw email and phone are never written to storage, logged or transmitted.
  • Forget on requestreset wipes the visitor locally and asks Nitx to delete the profile.
How the SDKs handle data
Your appidentify
nitx('identify', { email: ' Ada@Example.com ' })
Trimmed and lowercased
Normalisedin memory
ada@example.com
SHA-256 on the device, then the raw value is discarded
email_sha256the only form stored
b5fc85e55755f9e0d030a10ab4429b6b2944855f9a0d60077fe832becbc41d72
Sent to Nitx in the visitor block, only once your consent UI says yes
Consentfrom your banner
nitx('consent', true)

Shipping in the open

  1. iOS native ads: overlay underneath the child with forwarded clicks via NitxNativeAd.performClick(), same design as Android

    Flutter SDK34e3311

  2. README: document NitxNativeAd.performClick()

    iOS SDK49554b4

  3. NitxNativeAd.performClick(): programmatic click for hosts that render outside UIKit (Flutter)

    iOS SDK7d89533

  4. Nitx Publisher SDK for Flutter 1.0.0: bridge over the Android and iOS SDKs, banner and native ad views, example app, unit tests

    Flutter SDK71d3f07

  5. Nitx Publisher SDK React Native bridge 1.0.0: TypeScript surface, Kotlin and Swift modules over the native SDKs, NitxBanner and NitxNativeAdView, example app, jest tests, README

    React Native SDKc8b7e40

Your first Nitx ad is a few lines away

Pick your platform, paste the code from your dashboard and ship. The docs stay public, no account needed.