ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

Loader Google Analytics 4 Audience

This loader is used for importing Google Client IDs to Google Analytics 4 accounts. 

Component process:

  1. The component will read the configuration.
  2. Parse data from the CSV file.
  3. The component will send data (each Google Client ID) to Google Analytics in 10 threads.

Learn more: about Google Analytics 4 measurement protocol API documentation here

Data In/ Data Out

Data In

The loader requires an export.csv file in the directory /data/in/tables/export.csv 


File structure: 


customer_entity_id,google_client_id_column_namegoogle_client_id_column_name,[optional_columns]

002ca22b2249514125f34a4caace2c8c,"[""1146720615.1594475259""]"

10278832e8dd78d0095bf0022b7cb77d,"[""328282852.1594253327"", ""343221314.1594879134""]"

  • Name of the google_client_id_column_name is configurable in the config.json file.
  • Google_client_id_column_name is required in the input file.
  • Data type: Array [string].
  • All additional columns and their values are sent as custom payload (key-value pairs) in the event ‘params’ property.

Data Out

N/A

Learn more: about the folder structure please go to this article.

Parameters 

Credentials

image (4).png

Google Analytics 4 - Measurement ID (required)

The measurement ID that is associated with a stream. It can be found in the Google Analytics UI under: 

  • Admin > Data Streams > choose your stream > Measurement ID

API Secret (required)

An API secret that is generated in the Google Analytics UI. To create a new secret, navigate to: 

  • Admin > Data Streams > choose your stream > measurement protocol > create

Audience

Screenshot 2022-04-04 at 4.57.17 PM.png

Google Client ID - Column Name (required)

The name of the column with Google Client IDs (see Input file structure section).

  • Data type: string

Audience Name (required)

The name of the audience (parameter visible in Google Analytics 4 account).

  • Data type: string

Segment ID (required)

The ID of the exported segment.

  • Data type: string

Example

Example
{
"parameters": {
"credentials": {
"measurement_id": "G-XXXXXXXXXX",
"#api_secret": "###"
},
"audience": {
"google_client_id_column_name": "me_google_id_all",
"audience_name": "most valuable customers",
"segment_id": "42"
}
}
}