Skip to main content

Combining Multiple Features

Attributes are additive. For example, e-commerce + chat + consent in a single tag:

<script
src="https://edge.b2metric.com/b2m-web-sdk.js"
data-api-key="YOUR_API_KEY"
data-event-groups="core,ecommerce,search"
data-chat-integration-id="INTEGRATION_ID"
data-chat-api-key="CHAT_API_KEY"
data-chat-tenant="TENANT"
data-require-consent="true"></script>

If you also need custom events, switch from the script tag to the b2mConfig pattern (see Custom Events) and add the other options (e.g. requireConsent: true) to the same object — see Google Tag Manager for a full combined example.