Custom Variables to Record Actions
Custom Variables as we have learnt are very flexible. I wanted to share another cool way you could use events: to track an action taken on your website. In this case, we are going to learn below how to use Custom Variables to track clicks for a Mailto link. As this was disabled, I figured I would add here a way to get the tracking Mailto automatically.
The first step to tracking a Mailto action is to include the jQuery Library. If you are unsure if your page/website has it included, just click view source and look for the word “jquery.js” or “jquery.min.js” . If you do not have it, it’s easy to add. Google actually hosts a version of jQuery, so you can include it easily with the below markup in the
of your page.
<!-- Call to jQuery--> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <!--end of jQuery call-->
Ensure You have Piwik Tracking
It goes without saying oyu need Piwik installed, and you want to ensure you have placed your Piwik Analytics tracking code on your site. It should be placed just before