Quantcast
Channel: Piwik Forums - Support & Bugs
Viewing all articles
Browse latest Browse all 13117

Re: Inflated pageview numbers from repeated (not intentionally refreshed) pageviews

$
0
0
I've not got the exact code in front of me, but from memory the structure is roughly as follows:

1) At the bottom of the HTML, there is a bunch of script which includes the old Piwik tracker code, but modified:

<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://{PIWIKBASE}" : "http://{PIWIKBASE}";
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E");
</script><script type="text/javascript">
function doTrackingStuff() {
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", {PIWIKSITEID});
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
// .. and other tracking code
}
</script>

2) There is a script included in the <head> of the page that calls doTrackingStuff() on document.onload

I can see why things were set this way - it was to be compliant with the EU cookie laws (heh, so much for that really)

I am not sure if any of that helps

Viewing all articles
Browse latest Browse all 13117

Trending Articles