Thanks for this. Can you maybe explain a bit more and the implementation here, would this piece of code go into the html / Wordpress site and then where would I put the div calling the DWC ?
I tried something like this, however still not loading on first load:
<!DOCTYPE html>
<html>
<head>
<!-- Other meta tags, styles, and scripts -->
<script>
(function(global, document) {
function load() {
if(!window.MauticJS) return setTimeout(load, 250);
//Register page tracking event in mautic
MauticJS.onFirstEventDelivery( function(){
MauticJS.replaceDynamicContent();
});
}
"complete" === document.readyState ? load() : document.addEventListener("DOMContentLoaded", load);
}(window, document));
</script>
</head>
<body>
<!-- Your page content -->
NEW
<div data-slot="dwc" data-param-slot-name="contact-id-slot">
</body>
</html>