If the page being tracked is XHTML Strict and being served as content type application/xhtml+xml, some browsers will disable document.write().
At present, we don't differentiate between the secure vs non-secure domains where someone hosts piwik, yet we mimick GA's tag.
I believe we should change the tracking tag to simply use the relative URI without the scheme. This is in the original standard rfc1808 (circa 1995) -- now obsolete by rfc 3986 -- and is well-supported by modern browsers (and even old ones like IE4).
Note: document.write is no longer "deprecated" in html5, but the draft spec sums up why it shouldn't be used: http://dev.w3.org/html5/spec/Overview.html#dom-document-write
I have the feeling that if the GA tag contains the SSL detect logic like ours, there must be a good backward compatible reason, so I think this change has some risk involved.
Decreasing priority since this doesn't cause issues, and will not result in more functionality except for the few bytes saved in the tag.
It's not a compatibility issue. GA has a separate subdomain for https.
This was reported in: http://forum.piwik.org/read.php?2,78573
Would be nice to make the switch if it doesn't break with old browsers...?
we want to start advertising/pushing asynchronous tag, see #1845
What would be the asynchronous version of this change?
Increasing priority since disabling document.write sounds like a very good idea in general, and so far there is no known issues? we probably should test it with Ie6, 7, older versions of FF, etc> ?
From email, bug report with document.write causing xhtml to report error in FF.
Should we fix this ticket? is it really not risky at all?
closed in error
Thanks Anthon for the great link. It is indeed a wontfix (does not work under IE6).
Also the explicit listing of the https domain is a good reminder to the user that Piwik also needs to work in SSL... so it's useful :)
Milestone 1.8.x Piwik 1.8.x deleted