Google Analytics for the UNL Templates
Google Analytics is the preferred web analytics tool in the WDN Templates. It is installed on every template page, however departments must connect their individual accounts with their sites in order to view the data.
Google Analytics Version
In December 2009, Google released the Google Analytics Asynchronous Tracking Code. This code allows for an updated, more efficient way to collect Google Analytics data, while maintaining a better user experience for our end users.
Beginning October 7, 2010, unl.edu began using the async tracking code. Due to recommendations by Google and the nature of async tracking, the older non-async method will be deprecated effective October 22, 2010. In order to ensure no loss in analytics data, developers must upgrade immediately.
Implementing Google Analytics on Individual Department Sites
Implementing Google Analytics on department sites is even easier with the async code. To do so, simply add this code anywhere in your pages:
Note: Do not add the default call for the ga.js file as provided by Google. It will already be loaded, and duplicating will slow down your site and could cause date inaccuracies.
Implementing Google Analytics in UNL CMS
_gaq.push(['_setDomainName', '.unl.edu']); _gaq.push(['_setAllowLinker', true]);
See screenshot for details:
Google Analytics Customization
In this section, tips and tricks used by departments with Google Analytics can be shared.
Filter Internal/External Traffic
Instructions for creating profiles with internal/external traffic segments are available on this video: http://mediahub.unl.edu/media/3150.
Setup Local Site Search
If you are using Google Custom Search on your site and would like to track site searches, simply:
- Login into your Google Analytics account and edit the profile for which you would like to add the search tracking. Note: Each profile for site search should be tracked must be setup individually.
- Click "edit" next to the Main Website Profile Information.
- Select the "Do track site search" option under the "Site Search" section
- For the "Query Parameter" input box, enter:
- Select the "Yes, strip query parameters out of URL" option.
- Select "No" for the "Do you use categories for site search?" question
Track Links to Documents
This is done by default in the UNL Templates. All files ending with .zip, .exe, .pdf, .doc*, .xls*, .ppt*, .mp3, .mp4 are accounted for. The
href value for the link is what will be reported in your Top Content Report.
To find these in your Top Content report, use the regular expression in "Filter Page" input box: