Gallery3:Modules:piwik module - need help for Logging REMOTE_USER with the Piwik module
blaufotograph
Joined: 2007-07-30
Posts: 53 |
Posted: Thu, 2012-05-24 18:56 |
Currently i'am looking to integrate the REMOTE_USER variable into the Piwik Module http://codex.gallery2.org/Gallery3:Modules:piwik_module Quote:
piwikTracker.setCustomVariable(1, 'user', '<? echo $_SERVER['REMOTE_USER']; ?>'); Could you help me please, how i could add the line from above with the REMOTE_USER variable? _____________________________________________ blaufotograph Homepage: http://reisen.blaufotograph.de |
|
Posts: 814
From the looks of it, you'd need to add this in the helpers/piwik_plugin_theme.php file after the following:
[not tested as I don't use the module - but a start for you]
try { var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", '.module::get_var("piwik_plugin", "site_id").'); piwikTracker.setCustomVariable(1, 'user', '<?= $_SERVER['REMOTE_USER']; ?>'); piwikTracker.trackPageView(); piwikTracker.enableLinkTracking(); } catch( err ) {}
Hope this works for you.