matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.71k stars 2.62k forks source link

Accurate User Detection cross devices: User ID (set in JS and all other clients) #3490

Closed mattab closed 10 years ago

mattab commented 11 years ago

The goal of this ticket is to allow tracking of unique visitors across devices via the use of a User ID. This is similar to Universal Analytics User ID feature.

Tasks:

Let's make it work at least in following use cases, and add an automated test for it.

Todo:

Once feature is done, notify Android SDK project to brief on API and make sure feature will be there.

anonymous-matomo-user commented 11 years ago

Or instead, can we just set a custom request in the JavaScript?

For example:

piwikTracker.setExtraRequest({
    visitor_id: 'your id',
    additional_data: { /*......*/ }
});

In this case, we can capture as many parameters in the plugins as we can.

mattab commented 11 years ago

Cheers @tsteur for the ping

hpvd commented 10 years ago

I'm not sure about the way how to do it best. Should we really set/change the visitor ID for cross device detection if the user "gets a name" (e.g. by logging in)?

Maybe another way is to generated a new additional "User-ID" to which we could add all Visitor IDs.

so we have a structure like that:

User-ID

Doing it that way we could keep all details of "who is who" within piwik and the plugins of forums, shops etc (see ticket #3622) only have to submit on each login to piwik the pear of visitor ID and the account/mail/name.

hpvd commented 10 years ago

and another thing we should take care for:

anonymous-matomo-user commented 10 years ago

this is an almost impossible task. one would have to be truly accurate need to implement a method like comscores total universe reporting. whereby an individual is given a panel box and required to each time they logon verify id then users behaviour is assigned to that profile.

in assigning a user id to a machine one can lose site of what happens if one user logs in then someone else starts to use the machine?

the simplest solution though not 100% accurate is like in a paywell environment. a user is given a login and password. one can then assign a unique string then cross refrence it against device type or user agennt.

again limitation is user needs to login. you will have your site of those logged in vs non logged in. hope the sample ratio is enough to give you desired metrics to make informed decisions. one other thing there can also be a privacy issue when one starts to collect user data.(see googles new ad impression user data collection privacy policies)

i see the goal mentioned above but i have to ask what does this goal accomplish? what is the end result desired with the data mined from this? i think determining what this data will provide from an insights perspective should help direct this ticket.

mattab commented 10 years ago

See also #2211 piwik.js: Cross domain tracking

mattab commented 10 years ago

By default Piwik will still work as it has.

So this feature will be used only by some people. When the user is logged in on the site or app, and the webmaster knows an attribute for this particular user that they can use as "unique identifier" for them. for example could use username, uuid, email address, etc.

This will bring much more accuracy to unique users detection and tracking over time. This is simple idea, yet a powerful feature!

Sometimes called Unique User tracking, Unique devices tracking.

mattab commented 10 years ago

microsite.omniture.com/t2/help/en_US/sc/implement/index.html#CrossDevice_Visitor_Identification

mattab commented 10 years ago

Test this code http://forum.piwik.org/read.php?2,113975 and check it works fine.

anonymous-matomo-user commented 10 years ago

is it possible to link piwik with website login page so we can track usage by user name instead of by IP address? In other words we are using Piwik to monitor an agents usage of a website, and tracking by IP address is not as accurate as want.

mattab commented 10 years ago

@db394r this is exactly the goal of this ticket! stay tuned

mattab commented 10 years ago

I've been thinking about this and updated ticket description.

anonymous-matomo-user commented 10 years ago

Replying to matt:

@db394r this is exactly the goal of this ticket! stay tuned

Is there any update on this feature. It is getting really hard for me to produce correct reports for my upper management. They are wanting me to look for other options for tracking the usage of our internal website.

Thank you for your response, Daniel

mattab commented 10 years ago

@Daniel maybe your upper management would consider sponsoring our time to work on this feature? it would help get it out quicker for sure.

Please contact us via: http://piwik.org/consulting/ if you can help!

hpvd commented 10 years ago

Using this great feature, there should be a possibility to still know from where/which device which sites have been visited /which actions (events) have been made by the visitor.

Maybe one could give in the visitor profile:

Probably this is in details something to be implemented later but I could imagine that this is important for the technical design of this feature.

arunvishnun commented 10 years ago

Hi

Good to hear that this feature is being implemented in piwik. Till the time it becomes available in piwik, is there a way to at least group the current visitor log based on username ? I use custom variable to track username. Appreciate any suggestions/help in this.

Thanks Arun

mattab commented 10 years ago

Probably this is in details something to be implemented later but I could imagine that this is important for the technical design of this feature.

@hpvd sure that's a great idea to extend Visitor Profile to show info of configurations across visits. could you create an issue for this idea and then we could hopefully schedule it!

hpvd commented 10 years ago

as proposed a new issue was opened: "visitorprofile: show detailled info about device usage" #6161

mattab commented 10 years ago

To do before closing this ticket: create User ID user guide and FAQ and update resources.

mattab commented 10 years ago

New: User ID - JavaScript Tracking

mattab commented 10 years ago

New: User ID User guide

mattab commented 10 years ago

New: How do I get the number of active unique users to my app?

Updated: http://piwik.org/faq/how-to/faq_190/

Updated: How do I create new visit on demand, so that several users using the same computer or browser are counted separately?

How do I tell Piwik to track Unique Visitors based on the Visitor ID cookie, instead of using IP Address?

How do I track visits on my intranet?

mattab commented 10 years ago

feature is done! Check out the User ID user guide

dmitrizzle commented 9 years ago

Is there a way Piwik can merge visitorIDs? For example, if a user is identified with VID 1 on desktop and VID 2 on mobile and later on our system realizes it's the same guy (they've logged in with the same account on both devices).

Thanks!!

tsteur commented 9 years ago

I think this user feature does this

mattab commented 9 years ago

Use User ID and set the same User ID for a given user: http://piwik.org/docs/user-id/

shivateja-madipalli commented 9 years ago

I have a tricky thing to do, I'll explain in a scenario, Please guide me with this. Is there a way to get the current visitor (to my website) details from Piwik, by details I mean, IP + Referral + OS etc.. I can get all of these details from "Live.getVisitorProfile" by passing &visitorId = "xxxxxx" value.

I can also get the visitorId with "_paq.push([ function() { visitor_id = this.getVisitorId(); }])" OR "visitor_info = Piwik.getAsyncTracker().getVisitorInfo();" but these are giving entirely different visitorID for every visit from same IP address / eco system.

I just want to know how exactly is Piwik getting the value of a Visitor??

piwik screenshot

How can I get the Visitor Profile's ID? the ID shown in the image under visitors profile i.e., for every New / returning visitor Piwik is able to club visits from same IP under one umbrella, thus, there is being a tracking going on for sure, just want to know HOW??

ryanmccoy commented 8 years ago

@shivateja-madipalli almost a year late but just in case someone else is wondering, you can fetch the visitor ID from the tracking API (http://developer.piwik.org/api-reference/tracking-javascript)

see getVisitorId() function

mattab commented 7 years ago

@ryanmccoy @shivateja-madipalli this ticket is closed, could you create a new issue with the steps to reproduce the issue and what you got VS what you expected?