FeaturesHow it worksPricingDocsBlog
Sign inGet started

Win back the shoppers who almost bought.

Get startedChat on WhatsApp

Product

  • Features
  • How it works
  • Pricing

Resources

  • Docs
  • Blog
  • Recovery guide

Company

  • Careers
  • Support

Legal

  • Privacy
  • Terms
  • Data Deletion

© 2026 Nerja AI · Customer Intent & Retention

support@nerja.ai·+880 1886-157091

Chat on WhatsApp
  • Nerja AI documentation
  • Quick start
  • How Nerja works
  • Install the Nerja Tag
  • Events the tag detects
  • Tag JavaScript API
  • Privacy & consent
  • Mobile SDK overview
  • Get the SDK
  • Android SDK
  • iOS SDK
  • Push notifications setup
  • Push templates
  • Deep links: app or website
  • Connect email (AutoSend, Resend, Amazon SES)
  • Connect SMS (Twilio, BulkSMSBD)
  • Connect WhatsApp (WAAPI, Meta, Twilio)
  • Connect push (Firebase)
  • Campaign types
  • Delivery, open and click tracking
  • Signed user ids
  • Permissions explained
  • API reference
  • Store integrations
  • Troubleshooting
  • FAQ

Nerja Tag (website)

Install the Nerja Tag

Why the Nerja Tag exists, the one-line install, every option, and how to verify it.

Why you need it#

The Nerja Tag is a small script that runs in your visitors' browsers. Without it Nerja only knows about orders that already happened; with it Nerja sees the browsing, carts and checkouts that did not convert — which is exactly what recovery campaigns are made from.

// what

One script tag in your site's <head>. No code in your app, no per-event wiring.

// why

Cart, checkout and browse abandonment, intent scores and lead capture all depend on seeing behaviour as it happens.

Install#

  1. 1

    Get your public key

    In Agent Settings → API keys create (or reuse) a key of type PUBLIC_TAG. It is safe to put in a web page — it can only write events, and only from your allowed website.

  2. 2

    Paste the script

    Inside <head> on every page
    <script
      async
      src="https://t.nerja.ai/t.js?key=nak_pk_live_YOUR_KEY&api=https://api.nerja.ai"
    ></script>

    The exact line, with your real key and addresses, is on Data Brain → Client-side setup. Copy it from there.

  3. 3

    Publish and visit your site

    Open any page. Events appear in Data Brain within a few seconds.

Options#

Options go in the script's query string, or in window.NERJA_CONFIG defined before the script.

OptionDefaultWhat it does
keyrequiredYour PUBLIC_TAG key. (tagId is accepted as an alias.)
api—The Nerja API address events are sent to.
debug0Set to 1 to log what the tag is doing to the browser console.
consentidentitynone · identity · full — see Privacy & consent.
cartHours3Hours a cart item can sit before an abandoned_cart event is emitted.
cartCheckMin—How often (minutes) the tag re-checks carts for abandonment.
Using NERJA_CONFIG instead of the query string
<script>
  window.NERJA_CONFIG = { key: "nak_pk_live_YOUR_KEY", api: "https://api.nerja.ai", consent: "identity" };
</script>
<script async src="https://t.nerja.ai/t.js"></script>

Platform notes#

  • Shopify — installing the Nerja app adds tracking for you (via a web pixel); no theme edit needed.
  • WooCommerce — add the script through your theme header or a header-scripts plugin. Headless storefronts: put it on the storefront, not the admin.
  • Single-page apps / headless — add the script once in the root HTML; route changes are picked up as page views.
  • Google Tag Manager — a Custom HTML tag with the script, firing on All Pages.
  • Content-Security-Policy — allow the tag host in script-src and the API host in connect-src.

Verify#

  1. Open your site and add &debug=1 to the script URL temporarily — the console prints [Nerja] lines.
  2. In the browser's Network tab, look for POST /v1/events/batch returning 202.
  3. In Nerja, Data Brain should list the page view.

Nothing arrives?

Check that the page's origin matches your workspace website — a PUBLIC_TAG key is only accepted from your own site. See Troubleshooting.

How it sends data#

  • A first-party cookie (_cid) plus a local-storage anonymous id identify the browser; sessions roll over after 30 minutes.
  • Events are batched and sent about every second, or every 15 events, to /v1/events/batch; they are flushed when the tab closes.
  • If the network fails, events wait in a local outbox and are replayed on the next page view.

Prefer to talk it through? Book a 30-minute call with the Nerja team.

PreviousHow Nerja worksNext Events the tag detects

Something unclear or missing? Email support@nerja.ai and we will improve this page.

on this page

  • Why you need it
  • Install
  • Options
  • Platform notes
  • Verify
  • How it sends data