Docs / Développeurs
Cet article est affiché en anglais.
Google Tag Manager
Two templates:
| Template | Role |
|---|---|
| EngageNudge SDK | SDK init, consent, install diagnostics |
| EngageNudge commerce | GA4 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 originA GTM-only setup without /en-sw.js must not appear fully green in Install Doctor.
Core install
- Host
/en-sw.json the origin. Download the stub from the dashboard Integrations tab, not from GitHub. The tag loadsen-sdk.jsfrom EngageNudge. - In the dashboard, Download template.tpl. Then GTM → Templates → New → Import that file.
- Tags → New → EngageNudge SDK. Fill site key and VAPID public key from the dashboard.
- Trigger: All Pages, or Consent Initialization / Consent Update when using a CMP.
- Preview. Look for
engagenudge_install_diagnosticon the dataLayer.
| Field | Typical value |
|---|---|
| Site key | Dashboard → Integrations |
| VAPID public key | Dashboard → Integrations |
| API URL | https://api.engagenudge.com |
| SDK script URL | https://engagenudge.com/sdk/v1/en-sdk.js |
| Service worker path | /en-sw.js |
| Require consent | On 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.