support for user tracking?
-
First, love the automated way you give network admins the ability to create new analytic properties via this plugin. Really cool stuff!
Question:
Will you ever offer support for user tracking?From this thread https://forum.piwik.org/t/show-wordpress-user-name/8637/23
I noticed that you can use this in the script:<!-- Function to get the username from WordPress for Piwik User Tracking --> <?php global $current_user; get_currentuserinfo(); $user_info = get_userdata(1); $Username = $current_user->user_login;?> <!-- Piwik --> <script type="text/javascript"> var _paq = _paq || []; <!-- Piwik Custom Variable for User Tracking --> _paq.push(['setCustomVariable',1,"Username", "<?php if (empty($Username)) {echo 'Guest';} else {echo $Username;}?>","visit"]); <!-- End Piwik Custom Variable for User Tracking --> _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//agency.atlas6.koding.io/analytics/"; _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setSiteId', 1]); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); })(); </script>
It doesn’t work when I edit the code in the plugin’s enable tracking/manually tab. something happens where the ‘->’ shows everything after it on the page (user_login?>).
So I have to copy the code and put it my footer.php file. This works but renders your great plugin’s automation useless.
Support for setting up user tracking from the settings (and doing it across all subsites) would be fantastic.
- The topic ‘support for user tracking?’ is closed to new replies.