Hi!
I have added piwik for joomla and it workd awesome.
However I need to track information via username rather than IP address.
How to do it?
Many thanks
~Bhagya
Hi!
I have added piwik for joomla and it workd awesome.
However I need to track information via username rather than IP address.
How to do it?
Many thanks
~Bhagya
Use custom variable in javascript: Custom Variables Analytics - Analytics Platform - Matomo
Can you give me an example how to use custom variable in javascript?
many thanks.
OK I got it…
for others who looking for this. use,
piwikTracker.setCustomVariable(1, ‘User’, ‘<?php echo $uname; ?>’, ‘visit’ );
thnx matt
Hi Matt!
Would you please tell me, in which file you have inserted that piece of PHP? In Joomla? Or in the tracking Code?
I am not familiar with those things like PHP.
Kind regards
Clemens
In Joomla template file; Template//index.php
before tracking code
<?php $user =& JFactory::getUser(); $uname=$user->name; ?>inside the tracking code add
piwikTracker.setCustomVariable(1, ‘User’, ‘<?php echo $uname; ?>’, ‘visit’ );
hi ! thank you for your help; i did what you sais but it dosent work for me !!!
here is my index.php: index
i added piwikTracker.setCustomVariable(1, ‘User’, ‘<?php echo $uname; ?>’, ‘visit’ ); on the plugin
any idea ?!