Custom variables are recorded but piwik fails when creating segments

Hi all,

We are using piwik for an administration system that is being used by 80.000 users a day. Because of the ever growing complexity of the system, we want to attach the specific ‘roles’ of user towards the piwik sessions. In the end we want to measure which role is using which part of the application the most.

To give more context towards our collected user data we want to add a custom variable to our analytics which stores the ‘role’ of a particular visitor. So we can put there actions with in context.

Adding the custom variables is not the problem. Piwik now nicely registers the custom variable.
However when I want to create a segment on a particular role, and I go to the ‘Add new segment’ panel, I add ‘custom variable value 1’ and then it should show all the collected roles that are captured in custom variable 1. How ever a throbber appears and loads for 20 seconds and then nothing is shown.

The custom variables are shown in the custom variable screen, there are 240 possibilities. Is this large amount of variants a problem for Piwik? Or is the problem that the custom variable is stored for every ‘page’ visit instead of every ‘visit’?.

What are the best options to improve the performance? Or at least make sure that i can create segments? Reducing the number of possibilities of the custom variable? Setting it towards visit instead of page? Have more people issues with large number of possibilities in custom variables?

I already appreciate any response from anyone on this forum!

The reason the “Autocompleter” for the custom variable value does not load is because of the way it’s implemented: it will only look the last 500 visits custom variables values and suggest them here. we plan to improve this later see: Segment editor: improve autocompleter and suggest more segment values · Issue #6438 · matomo-org/matomo · GitHub
feel free to comment there

Thank you Matt!

We changed the custom variable from ‘page’ to ‘visit’ and now the autocompleter shows the available roles. So there is progression, however once in a while it does not show. Thanks for the extra info, makes it more understandable.

Keep up the good work!