close

Filter

Analytics Connectors Manual / Version 2301

Table Of Contents

4.1 Google Analytics

Google Analytics is accessed using the Google Analytics 4 API. To access Google Analytics Data, you need to create a service account (Google Developer Console). The service account json key file is used for authentication.

Note

Note

Remember to grant access to the analytics reports for the service account.

Custom event parameters must be defined as custom dimensions dimension1...n and pagePathLevel1 in the Google Analytics Web interface.

Custom Variable Use
dimension1 Content ID
dimension2 Content Type
dimension3 Navigation Path
pagePathLevel1 The segment of the content. This property is per default not available anymore with Google Analytics 4 and now tracked as custom property.

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
propertyId A numeric Google Analytics property ID providing the data to fetch (compare with property propertyId described in Table 3.2, “Google Analytics Studio Configuration Options”). true
authFile A link to a CMDownload document that contains the service account json key file as blob. true

Table 4.3. Google Analytics Retrieval Configuration Options


Retrieval configuration should be applied in InternalAnalyticsSettings, see Internal Settings. Example:

<StructProperty Name="googleAnalytics">
  <Struct>
    <IntProperty Name="propertyId">12345678</IntProperty>
    <LinkProperty Name="authFile" LinkType="coremedia:///cap/contenttype/CMDownload"
      xlink:href="Options/Settings/googleAnalytics%2Ejson.xml"
      cmexport:path="Settings/googleAnalytics%2Ejson"/>
  </Struct>
</StructProperty>
Caution

Caution

Please take care of security protection of the CMDownload content item containing your Google Analytics Service Accont Json 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

Caution

Please refer to the Google Analytics Developers Documentation for further information on request quotas.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.