Data Destination - Google Analytics 4 Measurement Protocol

Prev Next

summary

Help Page for ETL Configuration of Data Setting to Google Analytics 4 Measurement Protocol.

  • Data can be extracted from any Data Source and sent to Measurement Protocol (Google Analytics 4 Measurement Protocol).
  • It is necessary to map the column names and types in TROCCO when creating the ETL Configuration to conform to the Measurement Protocol format.

constraints

  • API restrictions apply.
  • One event is created per line of input.
    • Multiple inputs cannot be combined to create multiple events.

supplement

Data Destination Google Analytics 4 Measurement Protocol does not use Connection Configuration.

Setting items

STEP1 Basic settings

item name indispensable default value Contents
API Secret Yes - Enter the API secret of the data stream.
For details on how to check, please refer to How to Check Measurement ID and API Secret.
Measurement ID Yes - Enter the measurement ID of the data stream.
For details on how to check, please refer to How to Check Measurement ID and API Secret.
Request Verification Yes validity When enabled, the Measurement Protocol validation server verifies that the format of the event to be sent is correct.
At this time, if the request contains an event in an invalid format, TROCCO's ETL Job will be marked as Error.
Note that regardless of whether you choose to enable or disable, the transfer will be performed for events in the correct format.

STEP2 Detailed settings

column mapping

In the Column Setting of STEP 2 of TROCCO, you can send data to the Google Analytics 4 Measurement Protocol by mapping column names and types.
Match column names and types as shown in the table below.
For other columns, please refer to the API documentation.

column name type (e.g. of machine, goods, etc.) indispensable
client_id string Yes
events.name string Yes
events.params.${parameter name} Any type No
events.params.items.${parameter name} Any type No
user_properties.${parameter name} Any type No

Input Example

  • In the following example input, two offline_purchase events and one search event are created.
    • client_id: x There are two events for, one event is created for each line of input.
  • See the API documentation for details on events and user properties.
client_id evalue events.params.search_term events.params.items.item_id events.params.items.item_name user_properties.customer_tier user_properties.age
x offline_purchase USD 100 null SKU_12345 Stan and Friends Tee standard null
x offline_purchase USD 200 null SKU_67890 pN and Friends Tee standard null
y search null null t-shirts null null premium 30

How to confirm measurement ID and API secret

The following steps can be taken to check.

  1. From the Google Analytics 4 home screen, click Manage
    image

  2. Select any property and click on Data Stream
    image

  3. Click on any data stream
    image

    You can check the measurement ID.

  4. Click on Measurement Protocol API secret
    image

    You can check the value of the API secret.
    image