Show Visitor logs & Pages with usernames

I am using piwik for data tracking. Now I have a requirement, that I have to show Usernames in Visitor Logs and Pages along with the tracking data… I have checked custom variables, but unfortunately it does not help me in this requirement. My requirement is, in the visitor page and Pages there will be the tracked log for users. But I have to show which user accessed the data. I am attaching a screenshot of the same pages.

Here is there any way to show username in the place which i marked in Blue color.

Also in the pages I have to add another column say ‘User’ just before / after ‘Page Views’ and in that column I have to show the username.

Any help / suggestion is much appreciated. Thank you

Custom Variables will work. Set the scope to visit.
http://piwik.org/docs/custom-variables/

Did you find how to do it ? , any suggestion , custom variable doesnot works for me .

The UserID feature should now be the solution:
https://matomo.org/docs/user-id/

Hi lukas ,using javascript I tired to show the userID in my analytics , but didnot succed


<!-- Piwik -->
        <script type="text/javascript">
      
            var _paq = _paq || [];
           
              var visitor_id;
            visitor_id = document.getElementById('input userlogin');			
            _paq.push([piwikTracker.setCustomVariable( 1, 'UserName', visitor_id , 'visit')]); 
			_paq.push(['setUserId', visitor_id ]);
			_paq.push(['trackPageView']);
						
            _paq.push(["enableLinkTracking"]);
           
            (function () {
                var u = (("https:" == document.location.protocol) ? "https" : "http") + "://<%#PiwikServerUrl%>/";
                
        _paq.push(["setTrackerUrl", u + "piwik.php"]);
        _paq.push(["setSiteId", "<%#PiwikSiteId%>"]);
                var d = document, g = d.createElement("script"), s = d.getElementsByTagName("script")[0];
                g.type = "text/javascript";
                g.defer = true;
                g.async = true;
                g.src = u + "piwik.js";
                s.parentNode.insertBefore(g, s);
    })();
        </script>
        <!-- End Piwik Code -->

in page user ID and custom variable i can see any , thing its always empty !
image

image