您可以在位于 c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033 的 sharepoint init.js 中包含跟踪代码。所有共享点页面都将加载此 javascript,因此您可以跟踪所有页面。如:
var pkBaseURL = (("https:" == document.location.protocol) ? "https://testserver/Piwik/" : "http://testserver/Piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
var piwikScript = "%3Cscript type='text/javascript' %3E\n";
piwikScript += "try{ \n";
piwikScript += "var piwikTracker = Piwik.getTracker(pkBaseURL + 'piwik.php', 1);\n";
piwikScript += "piwikTracker.trackPageView();\n";
piwikScript += "piwikTracker.enableLinkTracking();\n";
piwikScript += "} catch( err ) {}\n";
piwikScript += "%3C/script%3E";
document.write(unescape(piwikScript));