@anonymous-matomo-user opened this Issue on December 19th 2012

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

@anonymous-matomo-user commented on January 23rd 2013

Attachment: Patch implementing the proposed new feature
3631.diff

@mattab commented on January 2nd 2013 Member

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 commented on January 4th 2013

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 commented on January 18th 2013 Member

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

and implementing in getConfigHash() sounds good!

@anonymous-matomo-user commented on January 23rd 2013

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

@anonymous-matomo-user commented on January 23rd 2013

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 commented on February 4th 2013 Member

@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 commented on February 8th 2013

@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 commented on January 13th 2014 Member

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

This Issue was closed on January 13th 2014
Powered by GitHub Issue Mirror