Adapter Properties and Commands

Adapter properties are used to configure the GA4 adapter connections, actions, cards, and nodes in the Design Server Web UI.

When a map or flow is configured and built, the properties in the GA4 cards and nodes are mapped to the adapter commands, which are used at runtime.

The adapter command line contains the generated adapter commands. It can be previewed in the Design Server with the Use Command Line toggle in the Connection step in the GA4 action, card, or node design workflow.

The following properties are supported by the adapter:

Credentials File

Specifies the file with the private key of the GCP service account used to access the GA4 account. It is a reference to the private key file of the GCP service account used to establish the GA4 connection.

The corresponding adapter command is -CF (or-CREDENTIALSFILE).

GA4 Property Id

Specifies a 9-digit identifier of the GA4 property. The GA4 properties refer to the websites or mobile apps for which the metrics are collected.

The corresponding adapter command is -GA4PROP (or -GA4PROPERTY).

Dimensions

Specifies the comma-separated names of the property dimensions to include in the report.

The corresponding adapter command is -DIMS (or -DIMENSIONS).

Specifies one or more property dimensions to include in the report. If only a single dimension is needed, it can be selected from the list of available dimensions retrieved by clicking the Fetch button located next to the Dimensions property. If multiple dimensions are needed, they need to be manually entered in the property, as a comma-separated list of dimension names.

Note: The dimension names that need to be specified are the dimension APINAMEs, not UINAMEs. The values are case-sensitive. Here is an example of this property's value:

audienceName,country,platform
Metrics

Specifies the comma-separated names of the property metrics to include in the report.

The corresponding adapter command is -METS (or -METRICS ).

Specifies one or more property metrics to include in the report. If only a single metric is needed, it can be selected from the list of available metrics retrieved by clicking the Fetch button located next to the Metrics property. If multiple metrics are needed, they need to be manually entered in the property, as a comma-separated list of metric names.

Note: The metric names that need to be specified are the metric APINAMEs, not UINAMEs. The values are case-sensitive. Here is an example of this property's value:

active7DayUsers, screenPageViews, checkouts
Date Ranges

Specifies the comma-separated date ranges to include in the report.

The corresponding adapter command is -DRS (or -DATERANGES ).

Specifies one or more date ranges. Only those events that occurred within one of the specified date ranges are included in the report. Individual date ranges need to be comma-separated. Date ranges are in the form STARTDATE ENDDATE. Each date needs to be in the yyyy-mm-dd format.

Include Header

Flag specifying if the header row should be included in the result.

The corresponding adapter command is -HDR (or -HEADER).

A property with Yes and No values determines whether the adapter should include a header row in the results. The default value is No. When set to Yes, a group type named HeaderRow is included in the generated schema, and the pipe-separated header field names are produced on the output as the first row of data, represented by the HeaderRow group. The fields comprising the header depend on the selected operation:
  • For the List dimensions and List metrics operations, the header fields are:

    APINAME, UINAME, DESCRIPTION, CUSTOM, and DEPRECATED.

  • For the Run report operation, the header fields are the dimensions and metrics that were specified in Dimensions and Metrics properties.
Row Limit

Specifies the maximum number of rows to retrieve from GA4 and produce on the output link.

The corresponding adapter command is -RL (or -ROWLIMIT ).

The adapter uses this property to limit the number of rows returned on the output link. The default value of the property is 0 which means no limit.

The adapter counts the rows it is returning on the output link and stops when the specified limit value is reached, or when no more rows are available. Note that the header row, if requested, is not counted towards the row limit.

Logging

Specifies the settings for the adapter log severity, append mode, and file location.

This property, along with its two sub-properties, Append Log and Log File Name is used to enable logging at the adapter level. When enabled, the adapter logs messages with details about the operations it is performing on the GA4 account. The default logging level is Info. The value Information means log informational, the value Errors Only means log error messages only, and the value Verbose means log debug and trace level messages along with the informational and error messages. The property Append Log can be set to instruct the adapter to append messages to the log file if the log file exists already, instead of overwriting it, which is the default option. The sub-property Log File Name can be used to specify the file name for the log file. By default the log file name is m4ga4.mtr and the file is created in the current map directory.

The corresponding adapter command is -T [V|E][+] [log_file] (or -TRACE [V|E][+] [log_file]).

-T -> Log adapter informational messages.

-TV -> Use verbose (debug) logging. The log file records all activity that occurs while the adapter is

producing or consuming messages.

-TE -> Log only adapter errors.

+ -> Appends the trace information to the existing log file. Omit this argument to create a new log file.

log_file-> The log file name.

Quantity

Internal property that serves as a contract between the adapter and the adapter framework for defining the desired number of rows to return from the data source.

The corresponding adapter command is -QTY.

This property is implemented internally in the adapter for historical reasons and is not available in the Design Server UI.

When the adapter is configured to fetch rows from GA4, it uses the value specified in the Row Limit property to determine how many rows to return. In addition to generating the -RL command, it generates and includes in the command line the -QTY command with the value of 0. This value instructs the adapter framework to keep making calls to the adapter to provide more rows until the adapter notifies it that no more rows are available.

The adapter uses the Row Limit property value to limit the number of rows to provide on the output link. When the specified limit value is reached, the adapter reports to the adapter framework that no more rows are available, and the reading operation ends. If the limit value is not specified, the adapter keeps fetching rows from GA4 until it notifies the adapter that no more rows are available. The adapter then passes that notification to the adapter framework, and the reading operation ends.

When using the adapter to read data from GA4, and creating the adapter command line manually, the -QTY 0 command must be manually included in the command line. This is the case for example when defining a GET map rule that uses the adapter, or when the Use Command Line mode is enabled in the adapter action, card, or node settings in the Design Server UI.

Read Mode

Internal property that indicates the source operation the adapter needs to perform.

The corresponding adapter command is -RM (or -READMODE).

This property is internally set to match the specified operation and is mapped to the -READMODE adapter command. When creating the adapter command line manually, the -READMODE command needs to be manually included in the command line. The supported values for the property are: run_report (default), list_dimensions, and list_metrics.