Category Archives: web analytics

Hosting Piwik.js on a CDN

piwik-logoI use Piwik to monitor a couple of sites. If you aren’t familiar with it, it’s an alternative to Google Analytics which you host yourself. I installed it as an experiment and fell in love with it. The thing is, most of my sites are hosted in a shared environment, yet I’m a bit obsessive compulsive about page load times. I host all of my static content (images, CSS & JS) on a CDN.

When you install Piwik it will prompt you to use the piwik.js file on the same domain where Piwik is running. Nothing wrong with that, but if you’re using a shared webhost like me that can add seconds to your page load times. Unacceptable. The difference is in the g.src variable of the tracking code.

Continue reading