Custom plugin for user activity

Hi all,

we are developing a plugin to view activity by logged-in user. We want to see which pages has each user visited.

To record the username we use a CustomVariable and we can view the data in the Custom Variables plugin.

But we want to develop a specific widget (and a plugin) that displays a table with the list of all users in the first column and the list of visited pages and datetimes for each user.

We are trying to build the plugin from the Actions and CustomVariables plugins but we can’t find enough documentation and we don’t know if this is the right approach.

Could you give us information about this?

Thanks in advance :slight_smile:

You can use the Visitors > Visitor Log, and restrict it to a given custom variable value by adding the segment for custom variables Segmentation - Compare segments of visitors - Analytics Platform - Matomo

Hi all,

I added the following segment in my code and also directly in the URL for my page custom variable:

$segment = 'customVariablePageName1==UserByPage;customVariablePageValue1==agonlar';

The Visitors > Visitor Log shows all the visits where the user ‘agonlar’ has done at least one action.
But this is not what i need. Because a visit is related to multiple users, and i need that every visit is related with
only one user.

Now in my page, if i’m not loged i’m a ‘visitor’, and i can do different actions, if i login after some minutes i’m a
loged user but i’m still in the same visit.

I need to show the pages visited for each user. So i think that i need to specify that every time
a new user login or logout a new visit should be created, i don’t know if it’s possible and how.

Something like that:

Vie 23 Dic - 07:11:27 - visitor : page a, page b, page c

Vie 23 Dic - 07:20:27 - agonlar: page c, page a, page d, page b

I use scope=page custom variabe, because if a user scope=visit i lose the old information,
and i have only the last user info.

I hope someone can help me with that.

Thanks in advance! :slight_smile:

Happy New Year! If you are still using Piwik and interested in the awesome new feature of “Creating a Custom Segment in Piwik and apply to reports in Real time!” we need YOUR help, with a little or big donation at:

This will allow to dynamically add or edit, a new set of rules for example “Show all visitors from USA and using Firefox and using Google”. This will be done via a simple to use interface. See screenshots and more info here:

We are crowd funding the future of Piwik and this feature in particular. With your help we can do it.