Skip to content
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

non-javascript tracking enabled/disabled in global.ini #1193

Closed
zawadzinski opened this issue Mar 4, 2010 · 8 comments
Closed

non-javascript tracking enabled/disabled in global.ini #1193

zawadzinski opened this issue Mar 4, 2010 · 8 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@zawadzinski
Copy link
Contributor

Currently Piwik tracks non-javascript browsers inspite of that FAQ says the opposite:
http://piwik.org/faq/new-to-piwik/#faq_63

  1. Add a configuration variable in global.ini that allows to disable/enable tracking non-javascript browsers.
    By default set it to disabled..
  2. Update the FAQ. Add notes about what is/is not tracked for non-javascript browsers.
  3. How do we handle requests from crawlers/bots?
@robocoder
Copy link
Contributor

  1. Instead of another setting, I can add a plugin (call it "NoScript") that hooks on Tracker.Visit.isExcluded, and ignores any visits where the 'rand' parameter is not set. (It is set by piwik.js on all requests: trackPageView, trackLink, and trackGoal.) In addition, move the Googlebot and Bing-bot detection out of Visit.php to this plugin. If someone later develops a bot detector, users can simply deactivate NoScript and activate the new plugin, and not mess around with overriding another configuration variable in config.ini.php.

@mattab
Copy link
Member

mattab commented Mar 5, 2010

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.

@robocoder
Copy link
Contributor

I'm still opposed to another config setting. How about we modify Tracker/Visit.php's isExcluded(): (pseudo-code)

    excluded = Googlebot || Bing bot detected
    if !excluded
        if (hasJavaScript) then
            process normally (browser with javascript enabled)
        else if UserAgentParser::getBrowser() == false then
            exclude visit
        else
            process normally (browser with javascript disabled)

    PostEvent('Tracker.Visit.isExcluded)

    // ...

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.

@mattab
Copy link
Member

mattab commented Mar 8, 2010

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?

@mattab
Copy link
Member

mattab commented Mar 8, 2010

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

@anonymous-matomo-user
Copy link

@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...

http://www.webdigi.co.uk/blog/2010/google-analytics-for-facebook-fan-pages/

@mattab
Copy link
Member

mattab commented Mar 16, 2010

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, ..)

@mattab
Copy link
Member

mattab commented Mar 18, 2010

(In [1931]) 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

@zawadzinski zawadzinski added this to the Piwik 0.5.5 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

4 participants