Tracking code and "document.write"


Hello !

I have a problem with “document.write” not compatible with xhtml5 that I use for my website. I can replace document.write as I’ve done in my website for my clock with:

and further in the script: document.getElementById('Clock').innerHTML=d+" "+m+" "+y+" - "+h+":"+min+":"+s;

But I don’t manage to replace it in my Piwik tracking code:

I choosed asynchronous code instead and it works. MY QUESTION: how to replace “document.write” in the normal code above (no asynchronous one) ?

Thanks a lot

(vipsoft) #2

Refer to the example in Test new snippet without document.write on various browsers + update all docs · Issue #2517 · matomo-org/matomo · GitHub


Thank you ! I’ll try it.