We worked around this issue by using something like
var imgsrc = _pk_getUrlLog('pix/' + io.filename, 5, pkBaseURL + 'piwik.php'); box.innerHTML += '<img src="'+imgsrc+'" border="0">';
Thanks. This is a duplicate of #355. The new piwik.js (now in testing) no longer uses document.write.
Sorry for the duplicate, overlooked it in the list :/.
Thanks for Piwik and keep up the good work!