Google Analytics
Documentation courtesy of Bill Brown, Web Application Developer, from The University of Chicago
Assuming you have a working uPortal instance, follow the instructions below to configure Google Analytics:
Step 1: Create a Google Analytics Account
Create a Google Analytics account at www.google.com/analytics
Step 2: Configure Google Analytics in uPortal
There are two ways to configure the Google Analytics feature in uPortal
Option 1: Configure through the UI
Login as an administrator
Go to the Portal Administration portlet (Under the Admin Tools tab) and click on the Manage Portlets link
Search for "Google Analytics configuration" and click Edit
Click on the "Edit Rich Configuration" link
Enter your Google Analytics Tracking Id under "Property Id"
To track groups (faculty, staff, etc..), enter an id followed by a group under the "Dimensions" input field.
For example, 1 : UCM Staff (see image below)
Complete the form with YOUR Google Analytics and Group details and click "Save"
Example image provided by The University of California, Merced
When adding dimensions, the dimension name should match the name configured in google analytics and the value should match the uPortal group name. When a page is loaded, uPortal will determine which dimensions to include by looping over the list of dimensions and then checking if the current user is a member of that uPortal group.
uPortal also supports configuration of multiple hosts. Additional hosts can be added by clicking on the "Add Host" button. Each host can have it's own google analytics ID, settings and dimensions. The google analytics portlet in uPortal will look for configurations where the hostname matches the hostname included in the request. If a matching host configuration is found, it will be used. If no matching host configuration is found, then the default configuration will be used.
Option 2: Configure through the portlet definition file
Open the portlet definition file at uPortal/uportal-war/src/main/data/quickstart_entities/portlet-definition/google-analytics-config.portlet-definition.xml
Uncomment the "defaultConfig" section and modify with your Google Analytics information (see example configuration below)
Import the updated file one of two ways:
Use the data-import command (ant data-import -Dfile=uPortal/uportal-war/src/main/data/quickstart_entities/portlet-definition/google-analytics-config.portlet-definition.xml)
Or, upload the modified file through the interface
Go to the Portal Administration portlet (Under the Admin Tools tab) and click on the Import, Export, and Delete Entities link
Click the "Choose File" Button and upload the modified google-analytics-config.portlet-definition.xml
uPortal/uportal-war/src/main/data/quickstart_entities/portlet-definition/google-analytics-config.portlet-definition.xml
|