Docs / Anleitungen

Dieser Artikel wird auf Englisch angezeigt.

Install your site

You need three things: the SDK snippet on your pages, a root-covering service worker on the visitor origin, and your public VAPID key. HTTPS is required. en-sdk.js is served by EngageNudge, so /en-sw.js is the only file you host.

Script

  1. Dashboard → Integrations → Script.
  2. Copy the snippet. It loads en-sdk.js from https://engagenudge.com/sdk/v1/ with your site key, VAPID public key, API URL, tenant id, and site id.
  3. Download en-sw.js from the dashboard and host it at the site root, on the same origin as the page. Browsers refuse a service worker from anywhere else.
  4. Open a public page and run Install Doctor.

Full reference: JavaScript SDK and Service worker.

WordPress

  1. Install the EngageNudge plugin (sideload the zip; WordPress.org listing is not submitted yet).
  2. Dashboard → Integrations → Script → generate a pairing code.
  3. WordPress → Settings → EngageNudge → API URL, site id, pairing code → Pair site.
  4. If you already have a root service worker, merge with importScripts('https://engagenudge.com/sdk/v1/en-sw.js');.

The plugin injects the SDK and can serve the worker. Publishing a post creates a draft campaign. It never live-sends on publish.

Guide: WordPress.

Google Tag Manager

  1. Host /en-sw.js on the origin. The tag loads the SDK from EngageNudge.
  2. Import the EngageNudge SDK template in GTM.
  3. Fill site key and VAPID public key. Trigger on All Pages, or on consent update if you use a CMP.
  4. Preview, then confirm Install Doctor.

GTM can inject the SDK and relay consent. It cannot install a same-origin service worker. A GTM-only setup without /en-sw.js will not go fully green.

Guide: Google Tag Manager.

After install