Setting up Universal Analytics
Before you can use Universal Analytics, you must configure the Google API Console and Google Analytics.
Prerequisites
You must have a Google Analytics account.
Configurations for the Google API Console
Complete the following steps to configure the Google API console:
- Log into the Google Developers Console.
- Create a new project by adding the Project Name and Location.
- Search for and add the Google Analytics API to the project and Enable.
- Go to Quotas.
- Set the Limit for Queries per minute to 1200.
- Set the Limit for Queries per 100 second to 2000.
- Go to Create Credentials and set up the OAuth Client ID credentials.
- Configure the OAuth Consent Screen and select the User Type as External.
- Add information for the following OAuth Consent
Screen fields. Do not add any scopes.
- App name
- User support email
- Developer contact email address
- Set the Application type as Web Application and provide a Name.
- Note the OAuth Client ID and Client Secret.
- Create a service account by providing the following
information. Do not add the information for any
optional fields.
- Service account name
- Service account description
A Service account ID is generated. Note the ID.
- Note the Service account email.
- Add a new Key for the service account. In the Create private key section, select Key Type as JSON. Download the JSON file.
Configurations for Universal Analytics
Complete the following steps to configure Universal Analytics:
- Log into Google Analytics.
- Complete the Account Setup.
- Create a Google Analytics new property.
- Go to Show advanced options and select Create a Universal Analytics property only.
- Select the relevant information about your site and click Create.
- Note the Tracking ID for the property. The Tracking ID is required to send store data to Google Analytics.
- Click the gear icon to view Account, Property, and View information.
- Create a new Google Analytics view for Management Center.
- Go to View settings and note the View ID.
- For the Website's URL, enter the
URL for the associated
live
store. - Select the Time zone country or territory and the Currency display as.
- Define the Site Search Settings
to track search keywords.
- Set Site search
Tracking as
ON
. - Add the Query
parameter. For example, add
searchTerm
as the Query parameter. - Select the Strip query parameters out of URL option.
- Set Site search
Tracking as
- Go to E-commerce Settings.
- Select Enable E-commerce and Enhanced E-commerce Reporting options.
- Optionally in Checkout Labeling, create the labels for checkout-funnel steps. For example, shipping, payment, review and so on.
- Grant the service account that you previously created in the Google API Console access to the view in Google Analytics.
- Go to View User Management, click the + icon and click Add Users.
- Add the Service account email and grant the Read & Analyse permission.
- Optionally set up filters on the view to include data only from the Production site in the reports.
- Go to Admin > Property > Custom Definitions > Custom Dimensions to add custom dimensions for the Universal Analytics properties defined for the Emerald and Sapphire Reference Store applications.
- Click NEW CUSTOM DIMENSION to
create the following custom dimensions. Important: The custom dimensions must be created in the specified order and with the specified Index.
-
Name: pageCategory
Scope: Hit
Index: 1
-
Name: pageSubCategory
Scope: Hit
Index: 2
-
Name: login
Scope: Hit
Index: 3
-
Name: userID
Scope: Hit
Index: 4
-
Name: searchTerm
Scope: Hit
Index: 5
-
Name: productResults
Scope: Hit
Index: 6
-
Name: onsiteSearch
Scope: Hit
Index: 7
-
Name: listerResults
Scope: Hit
Index: 8
-
Name: hclMarketplaceSeller
Scope: Product
Index: 9
-
Name: hclMarketplace
Scope: Hit
Index: 10
-