Google Analytics Plugin¶
A plugin to insert the Google Analytics tracking code into Redmine based on user roles.
Features¶
Adds your Google Analytics code to every pageview depending on your User roles; Anonymous user, Authenticated User, and Administrator.
Screenshot:¶
Installation and Setup¶
- Download the plugin. There are three supported ways:
- Downloading the latest archive file from Little Stream Software projects
- Checkout the source from Git
git clone git://github.com/edavis10/redmine-google-analytics-plugin.git vendor/plugins/google_analytics_plugin
- Install it using Rail's plugin installer
script/plugin install git://github.com/edavis10/redmine-google-analytics-plugin.git
- Login to your Redmine install as an Administrator.
- Configure your settings in Administration > Plugins > Configure
News¶
0.1.0 Release Announcement
0.2.0 Release Announcement
Hints and Tips¶
Tracking Logged In Users¶
You may add logged in user name using _setCustomVar call just before _trackPageview. Following Google Analytics code examples store user name in visitor-level slot #1 named 'Login'. They were tested on Redmine 0.9.3.
- traditional code:
... pageTracker._setCustomVar(1, 'Login', document.getElementById('loggedas') != null ? document.getElementById('loggedas').childNodes[1].textContent : '(anonymous)', 1); pageTracker._trackPageview(); ...
- asynchronous code:
... _gaq.push(['_setCustomVar', 1, 'Login', document.getElementById('loggedas') != null ? document.getElementById('loggedas').childNodes[1].textContent : '(anonymous)', 1]); _gaq.push(['_trackPageview']); ...
Results will be available in "Visitors" -> "Custom Variables" -> "Login" report.
Tracking Redmine Search Queries¶
Follow appropriate Google Analytics Guide and use "q" (without quotes) as "Query Parameter". Results will be available in "Content" -> "Site Search" reports.
Updated by Artem Naluzhnyy over 14 years ago · 7 revisions