Skip to main content

Browser Events dispatched by Intent

Charley Bader avatar
Written by Charley Bader
Updated over a month ago

The Made with Intent Client Script dispatches a number of custom events to the browser.

This is useful as events can be registered before the Intent Client Script is loaded.

intent.event.sent

An event was tracked and an inference response was received.

document.addEventListener('intent.event.sent', e => {
const result = e.detail;

console.log(result);
});

intent.segmentation.match.<segment_id>

A segment was matched

document.addEventListener(
'intent.segmentation.match.' + <segment_id>,
function(e) {
console.log('segment matched');
}
);

Did this answer your question?