Google Tag Manager (GTM) inladen optimalisatie
JAVASCRIPT Code
javascript
<script>
function loadGTM() {
// GTM code hier
}
const events = ['scroll', 'mousemove', 'click', 'touchstart'];
function interaction() {
events.forEach(event => window.removeEventListener(event, interaction));
clearTimeout(timeout);
loadGTM();
}
const timeout = setTimeout(loadGTM, 5000);
events.forEach(event => window.addEventListener(event, interaction));
</script>