Docs / Entwickler

Dieser Artikel wird auf Englisch angezeigt.

Behavior events

The SDK track() method posts named events to POST /v1/behavior-events with your site key. Use this for product views, cart updates, and similar shopper signals.

Commerce Nudges that consume these events (cart, back in stock, price drop) are off by default. Sending events does not turn those automations on.

From the SDK

js
window.engagenudge.track("product.viewed", { externalId: "sku-1" });
window.engagenudge.track("cart.updated", { externalId: "sku-2" });

Exact global name follows the loaded SDK. If you use the GTM commerce template, it maps GA4 ecommerce dataLayer events into track().

HTTP

POST /v1/behavior-events on the API host. Authenticate with the site key the SDK already uses. Schema-validate on our side. Do not send passwords, payment details, or other secrets in properties.

Keep externalId stable (SKU or product id). That is how later automations will join events to a product.