By default set it to disabled..
How do we handle requests from crawlers/bots?
we should limit as much as possible the number of "Tracker" plugins as execution time in tracking is critical; having a setting would be faster in this case.
Also, using the "rand" parameter to detect "JS" tracking mode is a good idea, but not ideal because in the future we might open the piwik.php? API for anybody to use (ie. tracking visits from a desktop software, or a widget, etc.) and they could generate the rand parameter to ensure cache bursting.
The problem is that currently we don't have a parameter in piwik.php for the noscript section, which we should... I suggest that we add a &js=1 in all piwik.php requests built with the piwik.js class ; Anthon, how does it sound?
I'm still opposed to another config setting. How about we modify Tracker/Visit.php's isExcluded(): (pseudo-code)
excluded = Googlebot || Bing bot detected
else if UserAgentParser::getBrowser() == false then
Note: a caveat with adding js=1 is that the server will discard tracking requests where the user's browser is caching an old copy of piwik.js. If we go this route, it should be documented prominently in the changelog.
The issue is that we will not count browsers with disabled JS by default, so we need a setting of some sort (or a plugin, but this is heavier), to do the choice "counting non-JS or not"
very good point on the caching issue... do you know what is the standard caching policy for web servers? I think that piwik.js is checked by the webserver and 304 are returned if the file has changed since the request header "If-Modified-Since". should we still expect some users to hit the new 0.5.5 piwik with requests built with an old piwik.js?
To allow plugins to hook and record non-js visitors, we could have a hook that returns boolean, true if the visit should be saved, false if not. By default, if no plugins hook, the returned value would be false. A plugin could then easily hook and return true in all cases, ensuring that non-js visits are recorded
@matt, that sounds good
based on that we would have quite a lot of possibilities to make cool things like tracking visitors on facebook an so on...
Anthon, I will implement the solution
kaystrobach, I would like to see such things done with Piwik, allowing to track visits on mysql, Facebook, or any other platform not allowing JS; to do so, we would need to document the API of piwik.php with the set of minimum parameters to set (eg. url, action_name, idSite, ..)
(In ) Fixes #1193
Added parameter rec=1 to JS built requests to piwik.php
We can imagine other usage of rec=1 parameter, for example to force tracking of non-JS visits on myspace, facebook, or other JS disabled environments