Is that possible to track users by their username in my cms?

Hello

piwik detects (distinguishes) visitors by ip adress.

My users (their usernames) can be identified through their cookies

Is there any feature or documentation to distinguish the visitors through their username (or geust)?
I can do a little php if needed.

I want to track my logged in users to know which pages they are interested in.

thanks in advanced

you can use custom variables for this: Custom Variables Analytics - Analytics Platform - Matomo

thank you

this is my new tracker

I added this line :
[…]
setCustomVariable (2, “username”, “$_G[member][username]”, “visit” ) ;
[…]

when I see the source of the loaded page I see this
[…]
setCustomVariable (2, “username”, “safaali”, “visit” ) ;
[…]

but there is no report availabe at piwik->visitor->costum variabel

what is wrong?:slight_smile:

you should use piwikTracker.setCustomVariable and not just setCustomVariable

hellp, i have the same need as you, but i can not know how to add the variable or how to trace it , My goal is to show the usermane in analytics.

So can you please tell me where exactely should I add this code and how .

Thank you .