Integration guide

One hub, many landing domains. Register a domain in the admin, drop one script tag on the page, and every ad-lifecycle event lands in the dashboard within seconds.

1 · Install the tracker

Add to <head> with the public key from Admin → Sites.

<script async src="https://event.noomijum.com/sdk.js" data-key="YOUR_PUBLIC_KEY"></script>

The tracker auto-tracks page views, assigns a visitor id (1st-party localStorage) and a 30-minute session, buffers events and flushes them in batches with navigator.sendBeacon on unload.

2 · Tracker API

The tracker exposes a single global window.nx. Slots: top, anchor, interstitial, rewarded, prewarm.

// Ad lifecycle (Google Ad Manager)
nx.ad('ad_request',  { slot: 'top', ad_unit: '/1234/top', size: '300x250' });
nx.ad('ad_filled',   { slot: 'top', cpm_win: 2.45, cpm_start: 5.00, waterfall_step: 3,
                       attempts: 3, latency_ms: 820, advertiser_id: '55', prewarmed: false });
nx.ad('ad_nofill',   { slot: 'top', attempts: 6, waterfall_step: 6, latency_ms: 1400 });
nx.ad('ad_viewable', { slot: 'top' });
nx.ad('ad_click',    { slot: 'top' });

// Funnel & engagement
nx.track('step',            { label: 'quiz_start' });
nx.track('cta_click',       { label: 'see_results' });
nx.track('rewarded_granted',{ slot: 'rewarded', label: 'unlock_content' });
nx.track('outbound_click',  { label: 'https://partner.example/offer' });
nx.track('error',           { slot: 'top', label: 'gpt_timeout' });

// Utilities
nx.pageview();        // manual SPA page view (auto-tracked on history changes)
nx.flush();           // force-send the buffer
nx.debug();           // console.table of everything sent this session
nx.visitorId;         // 1st-party visitor id
nx.sessionId();       // rolling 30-minute session id

3 · HTTP ingest endpoint

Any client can post directly — no SDK required. CORS is open for registered domains.

POST https://event.noomijum.com/api/public/collect
Content-Type: application/json

{
  "key": "YOUR_PUBLIC_KEY",
  "events": [
    {
      "session_id": "s_71bc...",
      "visitor_id": "v_9f3a...",
      "client_ts": "2026-07-27T10:15:03.221Z",
      "event_type": "ad_filled",
      "page": "/lp/summer",
      "referrer": "https://google.com/",
      "utm_source": "google",
      "slot": "top",
      "ad_unit": "/1234/top",
      "size": "300x250",
      "cpm_start": 5.00,
      "cpm_win": 2.45,
      "waterfall_step": 3,
      "attempts": 3,
      "latency_ms": 820,
      "prewarmed": false,
      "label": null,
      "value": null,
      "meta": { "anything": "extra" }
    }
  ]
}

204 No Content                     // accepted
400 { "error": "invalid_payload" }
403 { "error": "unknown_or_inactive_key" }
403 { "error": "origin_not_allowed" }
413 { "error": "payload_too_large" }
429 { "error": "rate_limited" }

Up to 50 events per request, 128 KB max body. Requests are rate limited per key/IP. The server derives country, device, OS and browser; never send PII.

4 · Event types

typemeaningkey fields
session_startFirst hit of a new 30-min sessionpage, referrer, utm_*
pageviewPage or SPA viewpage, referrer, utm_*
stepFunnel step reachedlabel
cta_clickIn-page CTA clicklabel
ad_requestSlot requested from GAMslot, ad_unit, size
ad_filledCreative rendered (impression)cpm_win, cpm_start, waterfall_step, attempts, latency_ms
ad_nofillWaterfall exhaustedslot, attempts, waterfall_step, latency_ms
ad_viewableActive view viewableslot
ad_clickCreative clickslot
rewarded_grantedReward unlockedslot, label
outbound_clickClick to external offerlabel (url)
errorRender / timeout / script errorslot, label

5 · Health check

GET https://event.noomijum.com/api/public/health  ->  { "ok": true, "ts": "..." }

6 · Adding a new domain

  1. Admin → Sites → Create site with the landing domain (e.g. newdomain.com).
  2. Copy the generated public key.
  3. Paste the script tag with that key on the landing page.
  4. Traffic appears in the dashboard and in the Sites comparison table immediately.