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? 1. Bot requests: this is the reason why we are not tracking non-script requests by default, as we don't have a way to deal with bots traffic.
I'm still opposed to another config setting. How about we modify Tracker/Visit.php's isExcluded(): (pseudo-code)
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 - adding a js=1 parameter for requests done with piwik.js - by default, ignore requests missing the js=1 - add a hook that would let a plugin record all visits regarding whether js=1 is set or not
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