In addition to sending events to Google Analytics and GTM, the Embed emits events to the parent page.
Example of adding Event Listener in the parent page:
document.addEventListener('bbEvent', (e) => {
if(e.detail && e.detail.action=="lead_captured"){
console.log("A " + e.detail.category + " lead was captured inside the Embed!")
}
});
Comments
0 comments
Please sign in to leave a comment.