pageviews and other tracking is working. anyone have some insight ?
i am trying to send this event:
var _paq = _paq || ;
_paq.push(["trackEvent", "MyCustomEvent", "dataName", "Testing the data"]);
i have added the custom event to another website were we are using piwik and there the custom event works as expected.
what do you mean excactly with main analytics script ? we can see pageviews etc, would that be possible without the main analytics script ?
Solution: If a custom event code is executed inside a function before loading the container (and effectively the analytics JS library), you have to define it in the global scope via window._paq. Otherwise it’s likely that _paq would be defined just as a local variable.