Imports data from Google Analytics.
Before you can download data from Google Analytics you have to give access to a Onesecondbefore account.
Then you need to give your Google Account access. There are two ways to do this:
Take the steps below to download Google Analytics data with a service account.
conn_id
client_email
from the Service Account `Read` access to the Google Analytics view you want to import data from.Take the steps below to download Google Analytics data with a delegated account. Please take note of the security precautions needed to secure this connection method.
extract:
view_id: ga:111925
dimensions:
- ga:date
measures:
- ga:sessions
- ga:users
- ga:pageviews
filters_expression:
- ga:medium==referral
segments:
- gaid::-3
- sessions::condition::ga:eventLabel=@some_label
order_bys:
- field_name: ga:pagePath
sort_order: ascending
property | type | required | description |
---|---|---|---|
conn_id | string | no | Default is google_cloud_default . Connection string as handed to you by the Onesecondbefore team. If your cloud is Google Cloud, the conn_id is not obliged. It will
take the client_cloud.db_conn_id. |
view_id | integer | yes | Put the view ID of the data you want to import. Format must be like ga:123456 |
dimensions | array of enumerator(full list here) | no | List of dimensions. |
metrics | array of enumerator(full list here) | no | List of metrics. |
include_empty_rows | yesno (boolean) | no | Default is no. If the data can include empty rows. |
order_bys | array of objects | no | Order the resultset on a field and optional direction (either ascending or descending )
|
segments | array of strings | no | Contains the segments. Can be segment id's (e.g. gaid::-3 ) or dynamic segments (e.g. sessions::condition::ga:eventLabel=@some_label ). |
filters_expression | array of strings | no | Contains the filters, e.g. ga:medium==referral . |
page_size | integer | no | Use this if you want to limit the import. |
item | description |
---|---|
API | Google Analytics Core Reporting API v4 |
Pre-formatted schema | Yes. Comes with a pre-formatted and described schema. |
Transforms | Yes. Field names are all transformed with the following transform configuration:
|