# tGoogleAnalytics4Report

Establishes a connection to Google Analytics 4 to retrieve data reports.

## tGoogleAnalytics4Report Standard properties

These properties are used to configure tGoogleAnalytics4Report running in the Standard Job framework.

The Standard tGoogleAnalytics4Report component belongs to the Business family.

The component in this framework is available in all Talend products.

## Basic settings

| Properties | Description |
| --- | --- |
| Property Type | Select the way the connection details<br>will be set.<br><br><ul> <li> <p> <span>Built-In</span>: The connection details will be set                                locally for this component. You need to specify the values for all                                related connection properties manually.</p> </li> <li> <p> <span>Repository</span>: The connection details stored                                centrally in <span><span>Repository</span><abbr> &gt; </abbr><span>Metadata</span></span> will be reused by this component. </p> <p>You need to click                                the <span>[...]</span> button next to it and in the pop-up                                    <span>Repository Content</span> dialog box, select the                                connection details to be reused, and all related connection                                properties will be automatically filled in.</p> </li> </ul> |
| Schema and Edit schema | A schema is a row description, and<br>it defines the fields to be processed and passed on to the next component.<br><br><ul> <li> <p> <span>Built-In</span>: You create and store the schema locally for this component                only.</p> </li> <li> <p> <span>Repository</span>: You have already created the schema and stored it in the                Repository. You can reuse it in various projects and Job designs.</p> </li> </ul><br><br>Click Edit schema to make changes to<br>the schema. If you make changes, the schema automatically becomes built-in.<br><br><ul> <li> <p> <span>View schema</span>: choose this                option to view the schema only.</p> </li> <li> <p> <span>Change to built-in property</span>:                choose this option to change the schema to <span>Built-in</span> for local changes.</p> </li> <li> <p> <span>Update repository connection</span>:                choose this option to change the schema stored in the repository and decide whether                to propagate the changes to all the Jobs upon completion.</p> <p>If you just want to                propagate the changes to the current Job, you can select <span>No</span> upon completion and choose this schema metadata                again in the <span>Repository Content</span>                window.</p> </li> </ul> |
| Authentication method | Select the mode to be used to authenticate to your project.<br><br><ul> <li> <span>Service account key</span>: authenticate using a Google                        account that is associated with your Google Cloud Platform project. When                        selecting this mode, the parameter to be defined is <span>Google                           credentials</span>.</li> <li> <span>Application Default Credentials</span>: authenticate using                        the Application Default Credentials. When selecting this mode, no additional                        parameters need to be defined as credentials are automatically found based                        on the application environment.</li> </ul><br><br>To know more about the Google Cloud authentication process, read [the Google Cloud documentation](https://cloud.google.com/docs/authentication/). |
| Google credentials | Paste the content of the JSON file that contains your service account key.<br><br>This property is only available when you authenticate using Service<br>account key. |
| Property ID | Select or enter the unique property ID for retrieving Analytics data. For<br>more information, read [the Google Analytics 4<br>documentation](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).<br><br>Information noteTip: To visualize all<br>available property IDs, click the [...] button next to<br>the corresponding field to bring out the Retrieve values<br>dialog box, and click Run in background. A new dialog<br>box opens with all the retrieved property identifiers you can select. |
| Start date/End date | Select or enter the start and end dates corresponding to the report you want to<br>retrieve. |
| Dimensions | Select or enter the name of the dimensions you want to use.<br><br>Example: Page title(PageTitle)<br><br>Fore more information, read [the Google Analytics 4 API documentation](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/Dimension).<br><br>This option impacts the schema of the output flow of this component. It is<br>recommended to update the schema by clicking the Guess<br>schema button after setting the dimensions in the table. |
| Metrics | Select or enter the name of the metrics you want to use.<br><br>Example: Sessions (sessions)<br><br>Fore more information, read [the Google Analytics 4 API documentation](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/Metric).<br><br>This option impacts the schema of the output flow of this component. It is<br>recommended to update the schema by clicking the Guess<br>schema button after setting the metrics in the table. |

## Advanced settings

| Properties | Description |
| --- | --- |
| tStatCatcher Statistics | Select this checkbox to gather the Job processing metadata at the Job level<br>as well as at each component level. |
| Read timeout | Enter the read timeout value in milliseconds. An exception will occur if the<br>waiting time expires before there is data available to read. |
| Advanced metrics | <ul> <li> <span>Expression</span>: Select or enter the expression                           corresponding to the metrics you want to use.<p>Example:                                 <kbd>eventCount/sessions</kbd> </p> </li> <li> <span>Name</span>: Specify a name for the previously defined                           expression. The name will help you reuse this expression in a filter                              clause.<p>Example: <kbd>eventCountPerSession</kbd> </p> </li> </ul><br><br>For more information, read [the Google Analytics 4 API<br>documentation](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/Metric).<br><br>This option impacts the schema of the output flow of this component. It is<br>recommended to update the schema by clicking the Guess<br>schema button after setting the metrics in the table. |
| Dimension filter clauses | Define your custom filter clause in JSON format. You can use the expression<br>name defined previously in this clause.<br><br>For more information, read [the Google Analytics 4 API<br>documentation](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/FilterExpression). |
| Metric filter clauses | Define your custom metric clause in JSON format. You can use the expression<br>name defined previously in this clause.<br><br>For more information, read [the Google Analytics 4 API<br>documentation](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/FilterExpression). |
| Keep empty rows | Enable this option to include in the response the rows where all metric values<br>are zero. |

## Global Variables

| Variables | Description |
| --- | --- |
| ERROR\_MESSAGE | The error message generated by the component when an error<br>occurs. This is an After variable and it returns a string. |

## Usage

| Usage guidance | Description |
| --- | --- |
| Usage rule | This component can be used as a standalone component or as a start<br>component of a Job or subJob. |