Docs / Développeurs

Cet article est affiché en anglais.

Google Tag Manager

Two templates:

TemplateRole
EngageNudge SDKSDK init, consent, install diagnostics
EngageNudge commerceGA4 ecommerce dataLayer → track() (optional, default off)

Honest boundary

GTM can inject the SDK and relay consent. GTM cannot install a same-origin service worker.

EngageNudge GTM tag + /en-sw.js on your origin

A GTM-only setup without /en-sw.js must not appear fully green in Install Doctor.

Core install

  1. Host /en-sw.js on the origin. Download the stub from the dashboard Integrations tab, not from GitHub. The tag loads en-sdk.js from EngageNudge.
  2. In the dashboard, Download template.tpl. Then GTM → Templates → New → Import that file.
  3. Tags → New → EngageNudge SDK. Fill site key and VAPID public key from the dashboard.
  4. Trigger: All Pages, or Consent Initialization / Consent Update when using a CMP.
  5. Preview. Look for engagenudge_install_diagnostic on the dataLayer.
FieldTypical value
Site keyDashboard → Integrations
VAPID public keyDashboard → Integrations
API URLhttps://api.engagenudge.com
SDK script URLhttps://engagenudge.com/sdk/v1/en-sdk.js
Service worker path/en-sw.js
Require consentOn if you use Consent Mode / CMP

Commerce template

The commerce template maps GA4 ecommerce events to track(). Those automations stay off until you enable them. See Behavior events.