@deeboh wrote:
Hey guys this may not be a bug but it sure is interesting.
here is my javascript tracking code. when I add the "trackEvent" attribute I get the error below in my chrome console. for now i'm removing the trackEvent directive. I guess i'll have to do manual event tracking per static content file.
in lieu of that, is there a way to enable event tracking from the javascript tracking script in a SPA (angular 2) w/o generating this error.
var _paq = _paq || []; _paq.push(["setDomains", ["*." + window.location.host + ""]]); _paq.push(['enableHeartBeatTimer']); _paq.push(['trackSiteSearch']); _paq.push(['trackAllContentImpressions']); _paq.push(['setCookieDomain', '*.domain.com']); _paq.push(['trackPageView'], 'Index Page Reload'); **_paq.push(['trackEvent', 'Index', 'Reload']);** _paq.push(['enableLinkTracking']); (function() { var u="//piwikaws.domain.com/piwik/"; _paq.push(['setUserId', 'curtisw_1']); _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); })();
Error Generated upon navigation when event tracking is enable as seen above,
piwik.js:22 Uncaught TypeError: aa.shift is not a function
at U (piwik.js:22)
at piwik.js:63
at piwik.js:64
U @ piwik.js:22
(anonymous) @ piwik.js:63
(anonymous) @ piwik.js:64Thanks...
Posts: 2
Participants: 2