$ 0 0 Use the latest version of Piwik. Go to Settings > Tracking code. Copy the code there, it does not use document.write.