Analytics Connectors Manual / Version 2210
Table Of Contents
Google Analytics is accessed using the Google Analytics Universal
API. To access Google Analytics Data, you need to create a
service account (Google Developer Console). The service account email and p12 Key File (PKCS Standard) are used for OAuth 2.0 authentication.
Note
Remember to grant access to the analytics reports for the service account.
Custom variables must be defined as dimension1...n in the Google Analytics Web interface.
Custom Variable | Use |
---|---|
dimension1
| Content ID |
dimension2
| Content Type |
dimension3
| Navigation Path |
Table 4.2. Google Analytics custom variables
Both page views and tracked events are considered at retrieval time. The following configuration options are available:
Technical Variable Name | Description/Value | Required |
---|---|---|
applicationName
| Name of the app accessing Google Analytics data, used in the UserAgent header of each request. | true |
pid
|
A numeric Google Analytics profile ID providing the data to fetch
(compare with property pid described in Table 3.1, “Google Analytics Tracking Configuration Options”).
| true |
serviceAccountEmail
| Email address of the service account. | true |
p12File
| Create a CMDownload content item and upload the p12 Key File as blob. Link this content item in the Analytics Settings P12 Key file field. | true |
Table 4.3. Google Analytics Retrieval Configuration Options
Retrieval configuration should be applied in InternalAnalyticsSettings, see Internal Settings. Example:
<StructProperty Name="googleAnalytics"> <Struct> <StringProperty Name="applicationName">appName</StringProperty> <IntProperty Name="pid">12345678</IntProperty> <StringProperty Name="serviceAccountEmail">ID@developer.gserviceaccount.com</StringProperty> <LinkProperty Name="p12File" LinkType="coremedia:///cap/contenttype/CMDownload" xlink:href="Options/Settings/googleAnalytics%2Ep12.xml" cmexport:path="Settings/googleAnalytics%2Ep12"/> </Struct> </StructProperty>
Caution
Please take care of security protection of the CMDownload content item containing your Google Analytics p12 Key File:
- Restrict read access to the CMDownload content item
- Ensure that no link is generated to the CMDownload content item, for example by linking to it in another content.
- Exclude the content item from website search by checking the corresponding option.
-
Headless Server: Configure the document path in the
blocklist
to prevent delivery of the file in headless environments.
Caution
Please refer to the Google Analytics Developers Documentation for further information on request quotas.