Quantcast
Channel: Matomo forums - Latest topics
Viewing all articles
Browse latest Browse all 13974

Trying to get Joomla user in Piwik

$
0
0

@Kenneth_Fribert wrote:

Hi all

I'm using Joomla here, and have been using Piwik for a long time, it looks really great.
I would like to track the username as well, and I found another (old) article on this page, about how to do that.
I inserted this:

$user =& JFactory::getUser();
$uname=$user->name;

In the index.php for the template.
Then I used the wizard to create the tracking code and that inserted

_paq.push(["setCustomVariable", 1, "User", "<?php echo $uname; ?>", "visit"]);

In the code, but in the backend it just shows:
User <?php echo $uname; ?>
Instead of the User username

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 13974

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>