3rd party integrations
...
Purple Tracking
Tracking Services

Google Analytics 4

19min

Summary

Official websites

Developer integrations

Platform

URL

Android

not supported

iOS

not supported

Web

Tracking service

Event support matrix

Overview of the supported events and their configuration.



Templates

Parameter

Actions

action label category

not supported

Views

name

not supported

Purchases*

none

not supported

(*) Tracking of Purchases is not supported in a freely configurable way. More detailed information can be found below in the description of the event configuration for purchases.

General structure in tracking_config.json

The tracking service key name in "tracking_config.json" is: "google_analytics"

General structure


Event Configuration

Actions

Google Analytics 4 supports action events.

Action event
Example


Views

Google Analytics 4 supports view events.

Action event
Example


Purchases

Google Analytics 4 does not support custom purchase events, but purchases can still be tracked and it is recommended to configure the purchase events.

Purchase event
Example


Templates

Google Analytics 4 offers a limited API to track purchases. Thus only the following data is sent:

API

Value

transaction_id

The transaction id of the purchase, if available.

value

The price of the product.

currency

The currency code of the price.

shipping

0

tax

0

items

Array of product items.

Items API

Value

item_id

The product id.

item_name

The product id (use the same value as item_id).

price

The price of the product.

quantity

1

As a result, no template needs to be configured.

Attributes

Google Analytics 4 does not support attributes.

Additional supported functionality

No additional functionality is currently supported.

How to configure

Native Purple App

Google Analytics 4 does not provide any native integration.

Deprecated configuration of Google Analytics 4. This configuration will be removed soon. 

Starting with PXP 3.7.0, the configuration of Google Analytics 4 is preferably done via "experience.config.json", as described in the "Web integration" section below.

Enable SDK

Settings location

"Your app" => "Consent/Push/Analytics" => "Analytics (General/Web)"

Setting

Description

Enable Google Analytics 4

To enable the Google Analytics 4 SDK on the web, activate this checkbox.

Google Analytics 4 Measurement ID

The measurement id.

Have a look at our screenshot based setup guide: Set Up Google Analytics 4

Apple privacy / ATT

Since there is no native SDK available in the apps, there is no ATT-controlled behaviour.

Consent Management

Since there is no native SDK available in the apps, there is no CMP-controlled behaviour.

Web integration

Enable SDK

Google Analytics 4 is not explicitly enabled. If a valid configuration of Google Analytics 4 is present in the "experience.config.json", the SDK is integrated into the HTML document.

Structure in experience.config.json

Plugin configuration


Consent management

If you use one of the CMPs supported by Purple, you must specify the CMP-specific vendor id for Google Analytics 4, which you can get from your CMP frontend. Additionally, the IAB vendor id for Google Analytics 4 can also be added.

Structure in experience.config.json

Plugin configuration with consent