Bug in javascript tracker


(alpha_one_x86) #1

I have drop the try catch statment in the piwik tracker because it don’t track when I add all the block:

var pkBaseURL = (("https:" == document.location.protocol) ? "https://stat.barnix.net/" : "http://stat.barnix.net/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 3);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();

It say:

Uncaught ReferenceError: Piwik is not defined

I can’t put the original tracker because html comment is missing and I need this tracker in external js call by:

Thanks to help my.


(vipsoft) #2

Sorry, I don’t understand. What HTML comment are you referring to?

If Piwik isn’t defined then that means piwik.js wasn’t loaded.