We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve. You can always opt out later via the link in the footer.
https://www.googleapis.com/auth/analytics.readonly
scope (e.g. by using OAuth 2.0 Playground).https://www.googleapis.com/auth/analytics.readonly
scope.gcloud auth application-default login \
--scopes=https://www.googleapis.com/auth/analytics.readonly \
--client-id-file=[PATH/TO/credentials.json]
GOOGLE_APPLICATION_CREDENTIALS
.
This is not recommended as long-lived keys present a security risk.kind: source
# Common source-plugin configuration
spec:
name: googleanalytics
path: cloudquery/googleanalytics
registry: cloudquery
version: "v4.7.0"
tables: ["*"]
destinations: ["postgresql"]
backend_options:
table_name: "cq_state_googleanalytics"
connection: "@@plugins.postgresql.connection"
# Google Analytics specific configuration
# Learn more about the configuration options at https://cql.ink/googleanalytics_source
spec:
property_id: "<YOUR_PROPERTY_ID_HERE>"
oauth:
access_token: "<YOUR_OAUTH_ACCESS_TOKEN>"
reports:
- name: example
dimensions:
- date
- language
- country
- city
- browser
- operatingSystem
- year
- month
- hour
metrics:
- name: totalUsers
- name: new_users
expression: newUsers
- name: new_users2
expression: "newUsers + totalUsers"
invisible: true
keep_empty_rows: true
property_id
(string
) (required)1234
)properties/
(example: properties/1234
)reports
([]report
) (required)start_date
(string
) (optional) (default: date 7 days prior to the sync start)YYYY-MM-DD
format (example: 2023-05-15
).
If not specified, the start date will be the one that is 7 days prior to the sync start date.oauth
(OAuth spec) (optional)concurrency
(integer
) (optional) (default: 10000
)scheduler
(string
) (optional) (default: ds
)
The scheduler to use when determining the priority of resources to sync.
Supported values are dfs
(depth-first search), round-robin
, shuffle
and shuffle-queue
.https://www.googleapis.com/auth/analytics.readonly
scope to run reports.access_token
(string
) (optional)https://www.googleapis.com/auth/analytics.readonly
scope
(e.g., by using OAuth 2.0 Playground).client_id
(string
) (optional)access_token
is empty.client_secret
(string
) (optional)access_token
is empty.name
(string
) (required)ga_
prefix followed by report name in snake case.dimensions
([]string
) (optional)9
dimensions can be specified per report.keep_empty_rows
(boolean
) (optional)name
(string
) (required)expression
is specified) of the requested metric.expression
(string
) (optional)invisible
(boolean
) (optional)