Skip to main content
PR #1971 shipped a universal website embed widget plus an admin-side customisation panel. This is the recommended embed path for any surface that isn’t a Shopify storefront (CMS, custom sites, partner portals).
Organisation branding and appearance settings

Branding & Appearance panel: theme mode, logos, and brand assets configured here.

What it is

A small embed script you drop into your site. The script finds a placeholder <div> and injects a Nudj widget wired to your community. The widget is styled from the community theme and respects the embed configuration created in the admin panel.

Setup

The page must be served over HTTPS. The widget signs members in with cookies marked Secure, which browsers refuse to set on an http:// page. On an insecure page the widget still renders, but sign-in silently fails — no error is shown. http://localhost counts as secure, so local development is unaffected. Load the page over http:// and the browser console will warn you.
1

Configure the widget in admin

Open the admin panel’s embed customisation panel (PR #1971). Choose the widget layout, theme overrides, and the authentication mode — OIDC SSO or API Link token handoff.
2

Copy the embed snippet

The customisation panel surfaces a ready-to-paste snippet. It looks something like:
3

Drop the snippet onto your page

Paste the snippet anywhere on the page. The widget renders into the placeholder div on first paint.
4

Authenticate the user

  • OIDC flow — the user clicks “Sign in” inside the widget and is redirected through your identity provider and back.
  • API Link flow — your server issues a Nudj token and your page passes it to the widget (see API Link for the protocol).

CSP allowlist

PR #2333 opened the Nudj user app’s CSP frame-ancestors directive so the universal embed can render on arbitrary third-party domains without the browser blocking it. This matters because the widget ships as an iframe under the hood — without the CSP change, every new embedding host would have needed a manual allowlist entry.

When to pick the universal embed

Send visitors to a place on your site

A welcome tour step can be something the visitor does on your own page, such as looking at pricing. When a visitor presses that step, the widget tells your page which step it was and your page takes them there. The widget never moves your page itself. Listen for nudj:tour_step and call event.preventDefault() once you have handled it. The widget then closes.
  • eventName is the custom event the step waits for, so it is the same name your site already sends when the visitor does it.
  • Call preventDefault() straight away in the listener, not after a fetch or a timer.
  • If you use the nudj("on", "tour_step", callback) form instead, return true from the callback to say you handled it.
  • If your page does not handle a step, the widget stays open and shows that step’s description as a short how-to line. A step with no description shows a stock line saying the step is done on the site itself, so give every step its own.
  • If your listener moves keyboard focus to the place, focus stays there after the widget closes.
  • Pressing a step does not complete it. The step is ticked when your site sends its event, as before.

Count sign-ups with your own tags

When someone joins your programme in the embedded widget, the widget tells your page once, so your own Google Tag Manager, Google Analytics, Meta Pixel or any other tag can count it with your site’s own cookies. Your page gets two signals at the same moment:
  • a nudj.sign_up event pushed to window.dataLayer (the widget creates dataLayer if your page has none);
  • a nudj:sign_up DOM event on document, which nudj("on", "sign_up", callback) subscribers also receive.
Neither carries anything about the member: no email, name, phone number or member ID. The event detail is an empty object. When it is sent:
  • Once per new member: a new account, or a guest who signs up and keeps their progress.
  • Only after the member accepts the widget’s cookie banner. A member who accepts within 30 minutes of signing up is still counted; one who declines, or decides later than that, is never counted.
  • Never for an existing member signing in, a guest who does not sign up, a reload, or a later sign-in on another day or device.

Trigger a tag in Google Tag Manager

  1. In Tag Manager, open Triggers and select New.
  2. Choose Custom Event as the trigger type and enter nudj.sign_up as the event name. Leave This trigger fires on set to All Custom Events.
  3. Save the trigger, then add it as the firing trigger on each tag that should count a sign-up, for example a GA4 event tag named sign_up, a Meta Pixel CompleteRegistration tag or a Google Ads conversion tag.
  4. Publish the container. In Preview mode, sign up in the widget and accept cookies: nudj.sign_up appears once in the event list.
Without Tag Manager, listen for the DOM event instead:
Your own cookie rules still apply on your page: your consent banner and Tag Manager’s consent settings decide whether your tags run when the event arrives.

Differences from the Shopify widget

The universal embed and the Shopify theme app extension share the same underlying Nudj user app. What differs:
  • Distribution — the Shopify widget is a theme app extension merchants add from the theme editor; the universal embed is a script tag you host.
  • Configuration surface — Shopify widgets are configured per-block in the theme editor; the universal embed is configured once in the admin panel.
  • CSP — Shopify storefront domains are allowlisted by PR #1638; universal embed uses the wider allowance from PR #2333.

Next steps

Embedding modes overview

Compare all four embedding modes.

Custom domains + theming

Theme the embedded widget to match your brand.
Last reviewed: 2026-04 · Related PRs: #1971, #2333, #1638