- Print
- PDF
Data Source - Google Analytics 4
- Print
- PDF
summary
Help Page for ETL Configuration of Report Data Setting from Google Analytics 4.
constraints
Google Analytics 4 has a Data Setting limit on the amount of data that can be collected by a property, and data sampling occurs when that limit is exceeded. For more information, see [GA4] About Data Sampling.
Custom Variable loop execution in the workflow can be utilized as a workaround for sampling.
In some cases, compatibility of dimension metric (indicator) data can cause ETL Job execution errors.
For example, if dateHour is
incompatible with other dimension metrics, such a message will appear in the error log.
body: {"error":{"code":400,"message":"Please remove dateHour to make the request compatible. The request's dimensions \\u0026 metrics are incompatible. To learn more, see https://ga-dev-tools.web.app/ga4/dimensions-metrics-explorer/","status":"INVALID_ARGUMENT"}}
You can check the official tool to see if the dimension metrics you wish to obtain are compatible.
Setting items
STEP1 Basic settings
item name | indispensable | default value | Contents |
---|---|---|---|
Google Analytics 4 Connection Configuration | ✓ | - | See Connection Configuration for Google Analytics 4. |
property ID | ✓ | - | Enter the Analytics property ID from which you want to retrieve data. See How to Obtain a Property ID. |
Time Stamp Format | ✓ | - | Select the timestamp format for the report. Note that the value set here cannot be set in the dimension. |
dimension | - | - | Enter the name of the dimension you wish to retrieve. Up to 8 dimensions can be set. Please refer to the official Google Analytics website for the values that can be set. If this item is set to zero, only timestamp format values are specified as dimensions. For more information on dimensional expressions, please click here. |
metrics | - | - | Enter the name of the metrics you wish to retrieve. Up to 10 metrics can be set. Please refer to the official Google Analytics website for the values that can be set. For more information on metric formulas, please click here. |
Data acquisition period | - | - | Enter the start and end dates of the data acquisition period. If not entered, the start date is set to 7 days before the current date and the end date is set to 1 day before the current date. Please enter in YYYYY-MM-DD format. Example: 2021-08-19 |
Transfer Method | ✓ | Full Data Transfer | Select either Full Data Transfer or Incremental Data Transfer. For more information on Incremental Data Transfer, see Incremental Data Transfer Function. |
STEP1 detailed settings
item name | default value | Contents |
---|---|---|
Number of rows to retrieve in one request | 10,000 | You can set the number of rows to be retrieved in a single request. |
What to do when an error occurs during job execution
When OutOfMemoryError occurs
If an OutOfMemoryError
occurs, the error may be resolved by lowering the value of the number of rows to be retrieved in a single request****to 1,000.
However, lowering this value increases the amount of tokens used per request, which is likely to cause RateLimitError
as described below.
When RateLimitError occurs
RateLimitError
occurs when any allocation of an analytics property is exhausted.
Included in the error message body:. {"error":{"code":429, "message":xxx}} Check the contents of
to see which allocation has been exhausted and take appropriate action.
[ERROR]: Exhausted property tokens:
[ERROR]: tokens_per_day:{consumed:{total:21242,average:103},remaining:177780}
[ERROR]: tokens_per_hour:{consumed:{total:21242,average:103},remaining:25549}
[ERROR]: concurrent_requests:{consumed:{total:0,average:0},remaining:10}
[ERROR]: server_errors_per_project_per_hour:{consumed:{total:0,average:0},remaining:10}
[ERROR]: potentially_thresholded_requests_per_hour:{consumed:{total:0,average:0},remaining:120}
[ERROR]: tokens_per_project_per_hour:{consumed:{total:21242,average:103},remaining:0}
[ERROR]: Rate limit exceeded:
[ERROR]: status_code: 429
[ERROR]: body: {"error":{"code":429,"message":"Exhausted property tokens for a project per hour. These quota tokens will return in under an hour. To learn more, see https://developers.google.com/analytics/devguides/reporting/data/v1/quotas","status":"RESOURCE_EXHAUSTED"}}
Wait until the allocation is restored and rerun the job.
For example, if tokens for a project per hour is
the cause, as shown above, the allocation will be restored in about an hour.
In this case, rerun the job about one hour after the error occurs.
For more information on each of the Analytics property assignments, see Google Analytics Data API (GA4) - PropertyQuota.
Reduce token consumption per request
If RateLimitError
still occurs after re-running the job with the allocation restored, adjust the token consumption per request to reduce the amount of tokens consumed.
The amount of tokens consumed can be checked from the value of AVERAGE
in CONSUMED
included in the error message.
Possible ways to reduce token consumption include
- Narrow the scope of the data acquisition period
- Fewer types of dimension metrics to be acquired
For various specifications, including the total amount of allocations and timing of recovery, see Google Analytics Data API (GA4) - Allocations.
Supplemental Information for Use
How to obtain property IDs
You can find it by logging into Google Analytics and going to****Manage (gear icon) on the left bar -> Property Settings -> Property ID.
About dimensional expressions
By using the dimension expression concatenate, a new dimension can be defined by concatenating multiple dimensions that already exist. If you used a dimension expression, enter a dimension name that does not duplicate any of the dimensions in the API Name column for each dimension, as well as any custom dimensions.
About Metric Expressions
Metrics expressions can be used to define new metrics by adding quadratic operations, etc., to existing metrics. If you used a metric expression, enter a metric name that does not duplicate any of the metrics in the API Name column for each metric, as well as any custom metrics.
STEP1 Detailed settings
Click on Advanced Settings to display the configuration items.
item name | default value | Contents |
---|---|---|
Status when "(other)" row is used | Error. | If "Succeeded" is selected, the transfer process is executed even if "(other)" lines occur. For more information, please refer to the official Google Analytics documentation at [GA4]About the "(OTHER)" row. |