Hello. I want to track javascripts (widgets which get included in several websites).
At the moment I am using this snippet in the widgets:
var script = document.createElement("script");
script.setAttribute("language","JavaScript");
script.setAttribute("src","www.example.org/piwik.js");
document.body.appendChild(script);
try {
var piwikTracker = Piwik.getTracker("www.example.org/piwik.php", 1);
piwikTracker.setDocumentTitle(document.location);
piwikTracker.trackPageView();
}
catch (err) {}
As you can see this uses piwik.js, but that´s a bad idea because of the file size.
Is it possible to use a tracking pixel or anything else in this situation?
Thanks a lot.