@deeboh wrote:
Hi folks. I'm observing something pretty disturbing. In my Angular 2 application i'm using the standard piwik tracking javascript (see below). With the defaults i'm able to observe some rudimentary tracking of user behavior. I noticed in the piwik controller folder --> breadcrumbs here the --> tooltips shows up as undefined. upon studying the docs the parameters responsible for these undefined events are e_c, e_c, e_a, e_n. Here is where things get interesting and confusing. When I peppered event tracking directives throughout my html I noticed that as expected the undefined values were now defined. However it appears the page view tracking was disabled or interrupted. meaning my page to page navigation indicators in the piwik controller are no longer displayed in the real time visitors widget. however now the events tracked are defined and show up as metrics in the actions --> Events section.
Help???
script which causes problems:
_paq.push(['trackEvent', 'category', ']);
when I add this code my script header or directly to a particular html file or css class within and anchor events are tracked but page views are no longer tracked. Is this a bug or am I breaking some rule by using track page view and event tracking at the same time in an Angular2 app?original script
<script type="text/javascript"> var _paq = _paq || []; _paq.push(["setDomains", ["*." + window.location.host + ""]]); _paq.push(['enableHeartBeatTimer']); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); _paq.push(['trackEvent']); _paq.push(['trackSiteSearch']); _paq.push(['trackAllContentImpressions']); _paq.push(['setCookieDomain', '*.controller.com']); (function() { var u="//piwikaws.controller.com/piwik/"; _paq.push(['setUserId', {{user.username}}]); _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setSiteId', 289]); 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="//piwikaws.controller.com/piwik/piwik.php?idsite=289" style="border:0;" alt="" /></p></noscript> <!-- End Piwik Code -->
Posts: 2
Participants: 1