@anonymous-piwik-user opened this Issue on March 25th 2009

Please provide a function to safely log requests from within javascript functions which modify the DOM.

Currently, when you try to log a visit from within a Javascript function which generates HTML output, calling piwik_log results in a document.writeln which apparently clobbers "large parts" of the DOM.

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">';

in the Javascript which we use to dynamically generate our pages, but this is Bad Practice (tm).

@robocoder commented on March 25th 2009 Contributor

Thanks. This is a duplicate of #355. The new piwik.js (now in testing) no longer uses document.write.

@anonymous-piwik-user commented on March 25th 2009

Sorry for the duplicate, overlooked it in the list :/.

Thanks for Piwik and keep up the good work!

This Issue was closed on March 25th 2009
Powered by GitHub Issue Mirror