piwik_log() kills the DOM when called: need new clean OO version of the JS tag
|Reported by:||remy.damour||Owned by:||vipsoft|
Description (last modified by matt)
First, thanks for Piwik, it look greats, I'm sure it will even get better.
Second, I filled this ticket as bug, because I did not expect piwik.js->piwik_log() to wipe out my entire DOM when called once DOM has been loaded.
The reason is the following:
- when you call document.write/document.writeln once your dom has been loaded, it clears all page content => calling piwik_log() once dom is loaded clears all page content
If you could simply remove "document.writeln('<img src="'+_pk_src+'" alt="Piwik" style="border:0" />');" from within piwik.js (or make it optional using a parameter on piwik_log function), it would enhance a lot piwik flexibility (and make my day :-)).
Below is the js code I use (based on mootools1.2) to load piwik.js and call piwik_log from external .js file once all DOM is loaded (maybe it can be useful to other people):
If you try it without commenting out document.writeln call from piwik.js, all your page content is wiped out. Once it's commented, everything works smoothly.
Change History (39)
comment:3 Changed 5 years ago by matt (mattab)
- Description modified (diff)
- Milestone changed from Stable release to DigitalVibes
- Summary changed from piwik_log() wipes out entire DOM when called once dom is loaded to piwik_log() kills the DOM when called: need new clean OO version of the JS tag
comment:23 Changed 5 years ago by vipsoft (robocoder)
- Owner set to vipsoft
- Status changed from new to assigned
comment:29 Changed 5 years ago by matt (mattab)
- Milestone changed from 2- DigitalVibes to 1 - Piwik 0.4
comment:30 Changed 5 years ago by vipsoft (robocoder)
- Resolution set to fixed
- Status changed from assigned to closed
comment:36 Changed 3 years ago by vipsoft (robocoder)
- Sensitive unset