How to track User logged on to the site (by username)

I am new to Piwik. It’s an interesting web analytic application but i am not much familiar with its functionality. Can anybody please tell me how i can track username of visitors who are logging in to my website boads.net. I want to track the user logged in by their username. Is here any way to track this? Can i do it by custom variable? or to do it by custom variable ?

use Custom Variables: Custom Variables Analytics - Analytics Platform - Matomo

[quote=matt]
use Custom Variables: http://piwik.org/docs/custom-variables/[/quote]

Can you please help me to code custom variable for this purpose. Here is what i am thinking to implement, is it okay?
piwikTracker.setCustomVariable(
1, // Index, the number from 1 to 5 where this custom variable name is stored
"login", // Name, the name of the variable, for example: Gender, VisitorType
"username", // Value, for example: “Male”, “Female” or “new”, “engaged”, “customer”
“visit” // Scope of the custom variable, “visit” means the custom variable applies to the current visit
);

Can you please let me know, Is this code work to know the username of visitors?

I’ve been looking for something like this. I have a very simple blog in Tumblr. But I am not contented with what I see in Google Analytics, I’d like to see something more specific. Can I use the article you posted? Thank you so much. :slight_smile: