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
Ok, a minor update. I've found another page on the same website (but under a different Piwik site id) with Piwik tracking - but it doesn't suffer the same 'reload' issue. Here are the interesting differences:

- Both share a set of the same Javascript files, some minor differences with inline script
- The non-affected pages have more (!) Javascript files imported
- Both run the Piwik tracking code through a separate function(s), defined like the old document.write code at the end of the <body> and run on the onload event from a script defined in <head>
- The non-affected pages are much faster to load - almost 1/2 the time it takes for the affected pages

This has been strengthening my idea that one of the scripts leave the page's DOM in an unstable state that causes it to reload. Given that the affected pages take twice as long, my theory is that at some point one or more of the many scripts are not downloaded completely prompting the refresh - and as the browser caches this/these script(s) so the reload occurs again and again.

Apologies that this is starting to sound like a question on how to debug complex Javascript: but has anyone come across similar issues and if so is the best way to go around it is to reduce the number of external Javascript files?

I'll return with updates - I hope to try to see if I can find breakpoints that could generate the refresh.

(Edit) Minor minor update from above: just discovered that both affected and non-affected pages do have the same number of external files.

However, the scripts are different: the affected pages contain (yet more) additional tracking with what I believe is Omniture that has these suspicious/interesting functions which timeout a call to set window.location. Still looking at how to replicate..

Viewing all articles
Browse latest Browse all 13117

Trending Articles