Skip to main content
All CollectionsDeveloper Support Docs
Browser Events dispatched by Intent

Browser Events dispatched by Intent

Charley Bader avatar
Written by Charley Bader
Updated over a week 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?