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

Do not use javascript-detected parámeters to recognize visitors #3631

Closed
anonymous-matomo-user opened this issue Dec 19, 2012 · 9 comments
Closed
Labels
Bug For errors / faults / flaws / inconsistencies etc. duplicate For issues that already existed in our issue tracker and were reported previously.

Comments

@anonymous-matomo-user
Copy link

I'm tracking visitor without using cookies, so Piwik is using config_id to detect if an action is a new visit or not. config_id is computed in getConfigHash() which uses 16 parmeters to identify the visitor (os, ip, browser...)

The problem is I'm tracking actions both from Javascript and from PHP, and, since PHP can't detect parameters as resolution or the Flash plugin, each visitor is generating 2 visits instead of one because different config_id are being computed.

Can we consider this a bug? A limitaion?

I propose not to use those parameters to compuse config_id, or at least, to have a new configurable option to enable this behaviour. For example "nonstrict_visitors_identification".

@mattab
Copy link
Member

mattab commented Jan 2, 2013

Yes it's a good idea, we could have a mode that only tracks visitor uniqueness using IP address?

If you provide the patch we might consider it!

the alternative is to use setVisitorId if you have the info from another system.

@anonymous-matomo-user
Copy link
Author

Then there would be a new configuration parameter (for example visitor_recognition_heuristic_strictness) with three possible values:

  • strict: Actual behaviour (default)
  • medium: Consider remote IP, language, browser name and version, and OS. Ignoring javascript detected parameters (resolution and plugins support)
  • low: Consider remote IP only.

Which should be the best approach to implement this feature?

The method recognizeTheVisitor() (in core/tracker/Visit.php), when no visitorId is found, tries to use configId to recognize the visitor. configId is calculated in getConfigHash().

We can modify getConfigHash() to use just IP, some parameteres or all parameters to compute hash, or we can modify recognizeTheVisitor() and add new cases, not just checking visitorId and/or configId.

Let me know what do you think and I'll happily implement it and provide a patch.

@mattab
Copy link
Member

mattab commented Jan 18, 2013

Yes I think your proposal is useful and a good idea,

and implementing in getConfigHash() sounds good!

@anonymous-matomo-user
Copy link
Author

Attachment: Patch implementing the proposed new feature
3631.diff

@anonymous-matomo-user
Copy link
Author

Feature implemented and patch uploaded. Please review it, thanks.

@anonymous-matomo-user
Copy link
Author

BTW, current code is ignoring "resolution" to compute the config hash, although it is one of the function parameters. Is it on purpose or is it an error/bug?

@mattab
Copy link
Member

mattab commented Feb 4, 2013

@pregodon - we have moved to github. Could you please submit pull request for this one?

Current code ignores resolution, because some devices have bad habit of updating resolutions on every page view.

@anonymous-matomo-user
Copy link
Author

@matt - Sorry, I've never used Git. I just installed it on my linux server; cloned Piwik; made changes to source code... and now what? I'm trying "git push origin" but I'm getting a 403 error. Can you help me, please?

@mattab
Copy link
Member

mattab commented Jan 13, 2014

Please post your comments and suggestions in the new ticket enclosing this request: #3490

@anonymous-matomo-user anonymous-matomo-user added this to the Future releases 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. duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

2 participants