How to create and analyse segments by User ID
Combining User ID tracking with segmentation in Matomo lets you understand how different types of visitors behave, for example comparing engagement between logged-in users and casual site visitors. You can isolate specific audiences, such as returning customers or subscribers, and analyse conversions and behaviours across all Matomo reports.
Segmentation is essential for personalised marketing and content strategies to identify what drives engagement among known users, tailor messaging for different customer groups, and measure how targeted content performs compared to general campaigns.
This guide explains how to create segments based on whether a visit includes a User ID and how to use those segments to compare key metrics across visits and users.
Create segments for logged-in users and anonymous visitors
- In the Matomo dashboard, open the segment selector.
- Click Add New Segment and provide a name that identifies the segment for logged-in users.
- In the first drop-down, select User ID.
- Select the condition operator
is not. - Leave the text field blank and click Save & Apply.
- Create a second segment that identifies the segment for logged-out (anonymous) users.
- In the first dropdown, select User ID.
- Select the condition operator
is. - Leave the text field blank and click Save & Apply.
Compare the two segments
Once data has been processed for the new segments, you can run a comparison.
- From the segment selector, choose the new Logged-in users segment.
- Go back to the segment selector and click on the comparison icon next to the second segment for logged-out (anonymous) users.
- Open any report to view the data for each segment side by side.
For example, if you want to see whether subscribed users engage more deeply with your content than casual visitors, analyse the Behaviour reports.
- Go to Behaviour > Pages to identify whether logged-in users explore more content during each session. Compare metrics to see the level of interaction between the two audiences.
- Open the Goals > Overview report and view the Goal conversion rate to understand if account holders convert more or less often than anonymous visitors.
This comparison can help reveal how account features, membership content, or personalised experiences influence engagement and conversion performance. Use these insights to identify which types of content, pages, or experiences most appeal to logged-in users and apply similar tactics to encourage more visitors to subscribe or create an account.