Installation Instructions - Google Analytics for Episerver 1 Beta
This document describes how to install the Episerver Google Analytics gadget on your machine and how to set up the website. This document covers both the installation instructions using the Episerver Deployment Center and configuration settings.
For more information about how to set up the tracking and display options, see Episerver Google Analytics User Guide.
Table of Contents
- Downloading and Running the Installation Package
- Configuring the Google Analytics Gadget
The following prerequisites exist for EPiServer Google Analytics:
- A website with EPiServer CMS 6 R2 with valid license installed.
- IIS 7+ or IIS Express.
- Remove existing tracking script on your website to avoid duplicated tracking scripts running on your site, for example, from the master page. Google Analytics module will add a tracking script to the page when a Tracking ID is configured in admin mode. Besides tracking, the script added by the module also tracks metadata such as Page ID, and code for tracking external links and downloads.
- You need to have registered your website to Google Analytics. Follow the instructions on the site to generate a Tracking ID.
Downloading and Running the Installation Package
Download and run the installation package for EPiServer Google Analytics gadget as follows:
- Download the EPiServer Google Analytics installation package from EPiServer World (login access required).
Open EPiServer Deployment Center (Start > Programs > EPiServer > Quick Links).
Select Install a Module from a Compressed File, and select the installation package you have downloaded and click Run.
- Select the website you want to install it to. Follow the installation wizard.
Configuring the Google Analytics
The module uses two virtual roles to authorize users, GoogleAnalyticsReaders and GoogleAnalyticsAdministrators. By default these are mapped to WebEditors, WebAdmins and Administrators giving all these roles access to the gadget and administrators access to the admin interface. To change map for these roles edit their respective config options in EPiServerFramework.config > episerver.framework > virtualRoles > providers. These roles are added during installation.
Changing Statistics Interval
These use default values and only need configuring for specific needs. These config options are added to the <appSettings> config section, for example, as follows:
<add key="epi.googleanalytics.contextbutton.enabled" value="false"/>
You have the following options:
|epi.googleanalytics.absoluteexpiration||Seconds statistic data received from google is cached (default 10 minutes).|
|epi.googleanalytics.slidingexpiration||Seconds statistic data received from google is cached (default 0). Each time a cached value is used this time is prolonged. This cannot be combined with absolute expiration.|
|epi.googleanalytics.contextbutton.enabled||Set to false to disable the context button in edit mode (default true). epi.googleanalytics.defaulttrackingid: Default value for tracking ID normally configured from admin mode (default empty).|
The Google Analytics module use Page.ClientScript to register tracking script on the page. This will only work if the page or master page contains a <form runat="server">. To add tracking to an aspx or master file, add the following to the template:
At the top:
<%@ Import Namespace="EPiServer.GoogleAnalytics" %>
Near the end:
<%= ((PageBase)Page).GetAnalyticsTrackingScript(Context) %>
For more information about the EPiServer Social Reach package and its content, please refer to the article Make Your Tracking Analytics Useful – Powered by Google Analytics for EPiServer.
Last saved: June 21, 2012