<span>
<a href="http://protect-your-family.hansaplast.com.my/upload/<?php echo $filename;?>.jpg" download onclick="trace_page('download');">
DownLoad
</a>
</span>
JS:
<script type="text/javascript"> var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-57995306-19']);
_gaq.push(['_trackPageview']); (function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})(); function trace_page(page) {
if ((typeof _gaq) == 'object') {
_gaq.push(['_trackPageview', '/' + page]);
}
} function trace_event(category, actions, label) {
if ((typeof _gaq) == 'object') {
_gaq.push(['_trackEvent', category, actions, label]);
}
} </script>