I am new Piwik user. I had a good experience with the setup and tracking the pages using the generated tracking code.
What I am trying to do is, have the tracking code in a seperate JS file and include that in the html page (SomeHtml.html) that I want to track. I have a js file called track.js which contains the tracking code (something like below)
var _paq = _paq || ;
var u=((“https:” == document.location.protocol) ? “https” : “http”) + “://myserver.com/piwik/”;
g.defer=true; g.async=true; g.src=u+‘piwik.js’; s.parentNode.insertBefore(g,s);
I have include the track.js in the SomeHtml.html file which I want to track.
When I load the SomeHtml.html page, I notice that the piwik.js call goes through where as the piwik.php call is not made. So the actual tracking does not happen.
I am not sure what I might be doing incorrect here. Any pointers to resolve this is really appreciated.