The Google Analytics step allows you to access your Google analytics data to generate reports or to populate your data warehouse. It uses the Google Analytics 2.4 API.
- You must have a Google Analytics account.
- The Google Analytics API requires an API key. Here is how to get it:
- Navigate to http://console.developers.google.com and click on API Console under Developer Tools.
- Sign in with your credentials.
- From the Projects page, create a new project. Once created, click 'Enable an API'. Locate the 'Analytics API', and click the 'OFF' button to change the value to 'ON'. turn on Analytics API.
- Click on the 'Credentials' link in the left-hand menu, and create a new Server Key for 'Public API access'. Enter in your IP address or network, or enter '0.0.0.0/0' to allow global access (not recommended for production systems). Once created, an API Key will be displayed. This is the key that is to be entered in the field within the Google Analytics step.
| Application Name
|| Chose an application name like "kettle" or leave the proposed
|Your Google Analytics account user name|
|Password||Your Google Analytics account password|
| Simple API Key
|| See the prerequisites section above to acquire the API key
| Specify tableId directly
|| Check this option, when you want to specify the tableId directly without getting the tableId from the profile
| Get tableId from profile
|| Select the tableId from your profile
|Start Date||Specifies the start date associated with the query - date must be entered in the following format: YYYY-MM-DD|
|End Date||Specifies the end date associated with the query - date must be entered in the following format: YYYY-MM-DD|
|Dimensions||Specifies the dimension fields for which you want to query - the Google Analytics API documentation provides you with a list of valid inputs and metrics that can be combined|
|Metrics||Specifies the metrics fields you want returned|
|Filters||Specifies the filter (described in the Google Analytics API documentation) for example, 'ga:country==Algeria'|
|Sort||Specifies a field on which to sort, for example, 'ga:city'|
| Use custom segment
|| Check this option, when you want to specify a custom segment
| Use predefined segment
|| Select from the predefined segments
Click Get Fields to retrieve a list of possible fields based on the query you defined.
Click Preview to preview data based on the defined query.
- Google Analytics Query Explorer: This tool lets you play with the Core Reporting API by building queries to get data from your Google Analytics profiles. You can use these queries in the step.
- Reference guides for Google Analytics: 2.4 API, Data API, Dimensions & Metrics.
- The original Google Analytics plug-in page and release announcement (from the initial developer Slawo) with some samples and further information.