New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Page Visibility API to detect pre rendering requests and avoid over-counting page views #2496
Comments
I think this feature doesn't suck: It's quite powerful from a users point of view. |
the problem is that these are different techniques (one client-side; one server-side). webkit breaks the link tracker ... which sucks more imho |
There is also the new Google chrome prefetching feature which can be tested in javascript: http://blog.chromium.org/2011/06/prerendering-in-chrome.html |
|
I think this feature should be implemented quickly. Google Chrome 13 is released now and has prerendering activated by default. It very likely will fast gain a large market share, significant enough to falsify the visitor statistics. Replying to alexwillner:
|
thoti, if you have some dev skills, it would be great if you could help and submit a patch for this feature :) |
I'll have a look at it. ;) |
I attached a patch for piwik.js. |
thoti, thank you for the patch. Some feedback
Thank you for following up :) |
thoti did you have any chance to look at my feedback above? Thanks! |
Attachment: Page which prerenders the site called prerendered.html |
Attachment: Site which gets prerendered by start.html |
TestingI used the the files attached, start.html and perendered.html, for testing. Google Chromes Task-Manager shows an extra process for each prerenderd page. You can call the Task-Manager by pressing Shift + Esc.
Also Change E-Commerce etc.I can do it. But it could take until mid-October. Sorry. |
cheers for the details on the tests! OK for the patch on Mid-october. We will include it in Piwik 1.7. |
Attachment: Patch for /trunk/js/piwik.js |
I updated the code now to work with the three functions mentioned in the List of all methods available in the Tracking API > Using the Tracker Object:
Suggestions for improvements are always welcome. :) (piwik_js.2.patch can be deleted, it's an duplicate of piwik_js.patch.) |
Thanks, looks good to me! Vipsoft can you please confirm the JS review? thoti, can you confirm you have tested the code and the config setter setCountPrerendered ? Have you tested in Chrome, Safari ? Thanks for the great patch, it will be nice to fix this issue and improve Piwik accuracy. |
Attachment: Patch for /trunk/js/piwik.js |
I have tested it with Chrome 15, Safari 5.1, IE 9 and IE 7 (compatibility mode of IE9), with and without setCountPrerendered. Testing is described at comment:11. In prerendered.html you might add piwikTracker.setCountPrerendered(true); before the call of trackPageView(). I couldn't upload a new version with this line included, because Trac thinks it's spam. There's a problem with Chrome. If you load start.html and immediately click on the link to the prerendered prerendered.html, the view of prerendered.html often gets logged twice. I could reproduce the problem with test-files having no references to Piwik, so it's likely to be a bug of Chrome. Unfortunately I couldn't figure out what exactly is going wrong. |
Thanks for your contribution. We'll commit for next release! If you have other ideas of improvements in piwik feel free to grab another ticket :) |
(In [5401]) fixes #2496 - thanks thoti!
|
todo: update api page investigate missed minification |
done |
The page requests happen in the browser, looking like a regular webpage view with the exception of a few JavaScript variables addressable from your sites JavaScript. Support for preloading webpages and all related assets is a feature of WebKit-based browsers released after May 2011, including Chrome 13.
Source: http://www.niallkennedy.com/blog/2011/06/webkit-and-chrome-prerendering.html
I think this feature sucks but we have to deal with it anyway.
This ticket is to test with these new browsers, and make sure that Piwik doesn't trigger the pageview when pre-fetching, and then trigger the pageview when the page is actually loaded.
The text was updated successfully, but these errors were encountered: