Google Analytics / Google Tag Manager
Official websites
Site | URL |
|---|---|
Website | |
Documentation | PXP implements two options that can be implemented on the web. These are:
|
Developer integrations
Platform | URL |
|---|---|
Android | not supported |
iOS | not supported |
Web | PXP implements two options that can be implemented on the web. These are:
|
(*) Available since PXP 3.7.0
(**) Available since PXP 4.0.0
Tracking service
Event support matrix
Overview of the supported events and their configuration.
| Templates | Parameter |
|---|---|---|
Actions | trigger* action label category | supported (Web) |
Views | trigger* name title* | supported (Web) |
Purchases and Attributes are not supported.
(*) The trigger and title templates are used by Google Tag Manager only.
General structure in tracking_config.json
The tracking service key name in "tracking_config.json" is: "google_analytics"
{
"google_analytics": {
"eventsEnabledByDefault": true,
"viewsEnabledByDefault": true,
"purchasesEnabledByDefault": false,
"attributesEnabledByDefault": false,
"events": {
// your configured list of events
},
"views": {
// your configured list of events
},
"purchases": {},
"attributes": {}
}
}Event Configuration
Actions
Google Analytics 4 / Google Tag Manager supports action events. More informations for Action Events can be found here: https://app.archbee.com/docs/qtjKveW7g556Yo3qfoyAY/8rrA4o7Vzdaw13Y-JOqEk
"action_event_key": {
"templates": {
"trigger": "The name of the trigger in Google Tag Manager",
"action": "value of template",
"category": "value of template",
"label": "value of template"
},
"parameters": {
"parameter_key_1": "value of parameter",
// your configured list of parameters (supported via web only)
}
}Templates
Template key | Required | Template value |
|---|---|---|
trigger | no | The name of the trigger in Google Tag Manager. |
category | yes | The category of the event. |
action | yes | The action of the event. |
label | yes | The label of the event. |
Parameters
Parameter name | Template value |
|---|---|
The name of the parameter. | The value of the parameter. |
Views
Google Analytics 4 / Google Tag Manager support view events. For the "view_event_key" additional information can be found here: https://app.archbee.com/docs/qtjKveW7g556Yo3qfoyAY/mIXE5-IjKbR47eUmMdyga
"view_event_key": {
"templates": {
"trigger": "The name of the trigger in Google Tag Manager",
"name": "value of template",
"title": "value of template"
},
"parameters": {
"parameter_key_1": "value of parameter",
// your configured list of parameters (supported via web only)
}
}Templates
Template key | Required | Template value |
|---|---|---|
trigger | no | The name of the trigger in Google Tag Manager. |
name | no | The name of the view. Used by Google Tag Manager only. |
title | no | The title of the page. This value overrides the default value. How the default value is created: Titles for content on the web are generated using a complex algorithm involving several preprocessing software components. This results in the title-tag within the html document. Matomo in web uses its value as page title. |
Parameters
Pameter name | Template value |
|---|---|
The name of the parameter. | The value of the parameter. |
Purchases
Google Analytics 4 / Google Tag Manager does not support purchase events.
Attributes
Google Analytics 4 / Google Tag Manager does not support attributes.
Additional supported functionality
No additional functionality is currently supported.
How to configure
Native Purple App
Enable SDK
Google Analytics does not provide a standalone native integration. To use Google Analytics in your native apps, you must do so through Firebase .
Apple privacy / ATT
Since there is no native SDK available in the apps, there is no ATT-controlled behavior.
Consent Management
Since there is no native SDK available in the apps, there is no CMP-controlled behavior.
Web integration
You can use the Purple Experience Builder to edit the "experience.config.json".
Google Analytics is not explicitly enabled. If a valid configuration of Google Analytics is present in the "experience.config.json", the SDK is integrated into the HTML document.
This can be done either as Google Analytics 4 or as Google Tag Manager. The corresponding configurations differ as follows:
Structure in experience.config.json
{
"purple": {
"analytics": {
"ga4": {
"configuration": {
"measurementId": "Provided by Google Analytics 4"
}
}
}
}
}Google Analytics 4
Setting | Description |
|---|---|
measurementId | Measurement id of your connected GA4. |
Google Tag Manager
Setting | Description |
|---|---|
useTagManager | Enables the Google Tag Manager instead of Google Analytics 4 |
addNoScript | Add the noscript iframe element to the body-element. Default is "false" |
containerId | The id of the connected container. |
When using the Google Tag Manager a further setup at Google Tag Manager Dashboard is needed. Please read on more here:
Consent management
If you use one of the CMPs supported by Purple, you must specify the CMP-specific vendor id for Google Analytics, which you can get from your CMP frontend. Additionally, the IAB vendor id for Google Analytics can also be added.
Structure in experience.config.json
{
"purple": {
"analytics": {
"ga4": {
"configuration": {
"measurementId": "Provided by Google Analytics 4"
},
"consent": {
"vendorId": "Provided by your CMP",
"iabVendorId": ""
}
}
}
}
}Consent
Setting | Description |
|---|---|
vendorId | The vendor ID managed by your CMP. |
iabVendorId | The vendor ID managed by IAB. |