intent.dataLayer.push()
Track events and various custom data points to our service endpoints for ingestion.
For more information see The Intent Tag SDK
intent.bus.subscribe()
Executes a callback function when Intent makes a prediction based on the event type you subscribe to. Registering events on the event bus allows you to receive events and dispatch them to one or more destinations in real time. Note that using Browser Events may be preferable when you need to ensure that events are registered berfore the Intent Client Script has loaded.
intent.bus.subscribe(
<event-type>,
<function(inferenceData)>
)
Parameters
Parameters | Description |
<event-type> | The type of event that was dispatched based on user activity on site.
Expected Values:
interaction - (dispatched on every page view, add to cart, conversion, click) event - as interaction, but including beacon events dispatched during periods of site inactivity click - dispatched on every click page_view - dispatched on every page view add_to_cart - dispatched on every add to cart conversion - dispatched on every conversion
|
<function.inferenceData> | The response data returned from Intent's modelling service |
Example
intent.bus.subscribe('event', ({
inferenceData,
}) => {
console.log(
inferenceData
);
});
intent.lastInference
A reference to the last inference data response. Modelled and analytical data points are exposed in intent.lastInference.data.
intent.version
The version number of the Intent Client Script deployed on site.

