Montgomery College is using Google Analytics to gather statistics for the Luminis IV.x portal. I talked a little about this during one of the sessions at Summit, and promised I would post information here about how to do it. The statistics provide us a way to track users logging into the portal, where they're coming from (what part of the country and world), how they got directed to the site (i.e, referring URLs), what type of browser they use and version, the connection speed (i.e, Cable modem, DSL, T1, dialup, etc), average time users spend on the site, tab hits and length of time spent on specific tabs, and so on. To date, there have been visits to Montgomery College's Luminis portal from 67 different countries, and nearly all 50 states.
Google Analytics is free to use. Navigate to http://www.google.com/analytics/ and click on the link "Sign up now" to begin. Once you get an e-mail to confirm your account, follow the links and then sign-in and click kon Analytics under My products. There, you'll need to click the Sign up button and provide Google with your website's URL and assign an account name and set your specific country information and time zone. You'll then need to agree to terms, etc., etc., etc. Then finally, you will see the Legacy Tracking Code (urchin.js) code that you'll need to add to your website. This information looks similar to below:
_uacct = "UA-32188231-1";
This code needs to be added to your Luminis IV.x nested-tables.xsl file in $CP_WEBINF/uPortal/org/jasig/portal/layout/tab-column/nested-tables.
Please be sure to save a copy of nested-tables.xsl BEFORE doing any modifications!!!
Below is the location in nested-tables.xsl to insert that code:
Look for the section: <xsl:call-template name="custTabOn">
and directly underneath the ending tag </xsl:call-template> paste the code from Google Analytics.
This code should be placed between </xsl:call-template> and </xsl:when> This places the code in the section where nested-tables works with the tabs so that you can get tab statistics and other information.
You will need to restart your webserver for the changes to take effect.
In Google Analytics, you will not see any results from adding the code to your Luminis environment until the following day, so keep that in mind.
Tab statistics in Google Analytics are under the Content area. We did re-writes in Google Analytics so that our tabs names were listed rather than the URLs to make it more readable. All of the re-writes are done from the Analytics settings, just click the Edit link for your site and apply filters (searches and replaces) so that in our case the My MC Home tab showed up as "My MC Home Tab" rather than /tag.44a4447c1e016185.render.userLayoutRootNote.uP?uP_root=root& .....
The re-write rule we added is a custom filter for each tab to do a Search and Replace. Below is a sample:
Filter Name: MyMC Home Tab Name Translation
Filter Type: Custom filter
Search and Replace
Filter Field: Request URI
Search String: ^/tag\..*\.render\.userLayoutRootNode\.uP\?uP_root=root&uP_sparam=activeTab&activeTab=u14l1s18&uP_tparam.*
Replace String: My MC Home Tab
Case Sensitive: No
Again, changes to the filters will be able to be seen a day after the changes are made in Google Analytics.
I haven't tried using Google Analytics with LP III.3.3.x, but we do know it works with LP IV.0.2, which is the version we're on at MC. Hope you find this as useful as we have at Montgomery College. We've been able to get some great stats information on the portal using these tools, and the fact that they're free makes it even better.