Reputation: 627
I configured Piwik analytics in my app.
I inserted this tracking code inside the body tag:
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["setDomains", ["*.mywebsite.com"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(['trackAllContentImpressions']);
(function() {
var u="//mywebsite.piwikpro.com/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 3]);
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="//eatngage.piwikpro.com/piwik.php?idsite=3"
style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
And I added the event trigger to the div:
<div class="my-class" onclick="_paq.push(['trackEvent', 'Documentary',
'Play']);">Click
</div>
In Piwik Dashboard, I see the clicking under "Visitors in Real-Time", but not under "Actions-Events" category.
How can I tracking events click please?
Thanks!
Upvotes: 0
Views: 1739
Reputation: 4424
You have to run archive process to see events under Actions-Events
. Make also sure your setting that allows to trigger archiving from the browser is enabled.
As a reference, you can use this article about configuring archive proccess: http://piwik.org/docs/setup-auto-archiving/
Upvotes: 1