If you cannot measure it, you cannot monitor it

If you cannot measure it, you cannot monitor it

While this is not always true analytics packages like Google Analytics and Piwik are valuable tools to aid in website management. After all what is the use of a website if no-one goes to it and what’s the use of promoting your website if you cannot tell whether it works or not.

Now you cannot monitor and measure everything, at least not in my experience. However this is not a reason to not try and it is very straightforward to hook the analytics packages into your website. You don’t even need a plugin.

Most website builders (WordPress for example) allow you to drop code into your header or footer. Google Analytics and Piwik provide code blocks that can be copied and pasted directly into your website. An example of Piwik is as follows:

<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//piwikurl/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 5]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//piwikurl?idsite=x" style="border:0;" alt="piwik" /></p></noscript>
<!-- End Piwik Code -->

Not very pretty but we don’t need it to be, the end user probably won’t ever see this, well unless they are viewing your website code.

This code connects to the piwik install and tells it someone has open your website and if this is on every page it will also tell it what page they opened, what browser they were use and what platform it came from (ie. iPhone, Android etc…). Very simple and extremely valuable.

Leave a Reply