Google Analytics (meltano
variant)
Table of Contents
The tap-google-analytics
Meltano extractor
pulls data from
Google Analytics
that can then be sent to a destination using a
loader.
Alternative variants #
Multiple
variants
of tap-google-analytics
are available.
This document describes the meltano
variant.
Alternative variants are:
-
meltanolabs
(default)
Getting Started #
Prerequisites #
If you haven't already, follow the initial steps of the Getting Started guide:
Installation and configuration #
Using the Command Line Interface #
-
Add the
tap-google-analytics
extractor to your project usingmeltano add
:meltano add extractor tap-google-analytics --variant meltano
-
Configure the settings below using
meltano config
.
Using Meltano UI #
-
Start Meltano UI using
meltano ui
:meltano ui
- Open the Extractors interface at http://localhost:5000/extractors.
- Click the “Add to project” button for “Google Analytics”.
- Choose "Add variant 'meltano'".
- Configure the settings below in the “Configuration” interface that opens automatically.
Next steps #
Follow the remaining steps of the Getting Started guide:
- Select entities and attributes to extract
- Add a loader to send data to a destination
- Run a data integration (EL) pipeline
If you run into any issues, learn how to get help.
Settings #
tap-google-analytics
requires the
configuration
of one of the following groups of settings:
-
key_file_location
view_id
start_date
-
oauth_credentials.client_id
oauth_credentials.client_secret
oauth_credentials.access_token
oauth_credentials.refresh_token
view_id
start_date
These and other supported settings are documented below. To quickly find the setting you're looking for, use the Table of Contents at the top of the page.
Client Secrets (key_file_location
)
#
-
Environment variable:
TAP_GOOGLE_ANALYTICS_KEY_FILE_LOCATION
, alias:GOOGLE_ANALYTICS_API_CLIENT_SECRETS
- Default:
$MELTANO_PROJECT_ROOT/client_secrets.json
How to use #
Manage this setting using Meltano UI,
meltano config
, or an
environment variable:
meltano config tap-google-analytics set key_file_location <key_file_location>
export TAP_GOOGLE_ANALYTICS_KEY_FILE_LOCATION=<key_file_location>
OAuth Client ID (oauth_credentials.client_id
)
#
-
Environment variable:
TAP_GOOGLE_ANALYTICS_OAUTH_CREDENTIALS.CLIENT_ID
, alias:GOOGLE_ANALYTICS_API_OAUTH_CLIENT_ID
How to use #
Manage this setting using Meltano UI,
meltano config
, or an
environment variable:
meltano config tap-google-analytics set oauth_credentials.client_id <oauth_credentials.client_id>
export TAP_GOOGLE_ANALYTICS_OAUTH_CREDENTIALS.CLIENT_ID=<oauth_credentials.client_id>
OAuth Client Secret (oauth_credentials.client_secret
)
#
-
Environment variable:
TAP_GOOGLE_ANALYTICS_OAUTH_CREDENTIALS.CLIENT_SECRET
, alias:GOOGLE_ANALYTICS_API_OAUTH_CLIENT_SECRET
How to use #
Manage this setting using Meltano UI,
meltano config
, or an
environment variable:
meltano config tap-google-analytics set oauth_credentials.client_secret <oauth_credentials.client_secret>
export TAP_GOOGLE_ANALYTICS_OAUTH_CREDENTIALS.CLIENT_SECRET=<oauth_credentials.client_secret>
OAuth Access Token (oauth_credentials.access_token
)
#
-
Environment variable:
TAP_GOOGLE_ANALYTICS_OAUTH_CREDENTIALS.ACCESS_TOKEN
, alias:GOOGLE_ANALYTICS_API_OAUTH_ACCESS_TOKEN
How to use #
Manage this setting using Meltano UI,
meltano config
, or an
environment variable:
meltano config tap-google-analytics set oauth_credentials.access_token <oauth_credentials.access_token>
export TAP_GOOGLE_ANALYTICS_OAUTH_CREDENTIALS.ACCESS_TOKEN=<oauth_credentials.access_token>
OAuth Refresh Token (oauth_credentials.refresh_token
)
#
-
Environment variable:
TAP_GOOGLE_ANALYTICS_OAUTH_CREDENTIALS.REFRESH_TOKEN
, alias:GOOGLE_ANALYTICS_API_OAUTH_REFRESH_TOKEN
How to use #
Manage this setting using Meltano UI,
meltano config
, or an
environment variable:
meltano config tap-google-analytics set oauth_credentials.refresh_token <oauth_credentials.refresh_token>
export TAP_GOOGLE_ANALYTICS_OAUTH_CREDENTIALS.REFRESH_TOKEN=<oauth_credentials.refresh_token>
View ID (view_id
)
#
-
Environment variable:
TAP_GOOGLE_ANALYTICS_VIEW_ID
, alias:GOOGLE_ANALYTICS_API_VIEW_ID
How to use #
Manage this setting using Meltano UI,
meltano config
, or an
environment variable:
meltano config tap-google-analytics set view_id <view_id>
export TAP_GOOGLE_ANALYTICS_VIEW_ID=<view_id>
Reports (reports
)
#
-
Environment variable:
TAP_GOOGLE_ANALYTICS_REPORTS
, alias:GOOGLE_ANALYTICS_API_REPORTS
How to use #
Manage this setting using Meltano UI,
meltano config
, or an
environment variable:
meltano config tap-google-analytics set reports <reports>
export TAP_GOOGLE_ANALYTICS_REPORTS=<reports>
start_date
#
-
Environment variable:
TAP_GOOGLE_ANALYTICS_START_DATE
, alias:GOOGLE_ANALYTICS_API_START_DATE
This property determines how much historical data will be extracted. Please be aware that the larger the time period and amount of data, the longer the initial extraction can be expected to take.
How to use #
Manage this setting using Meltano UI,
meltano config
, or an
environment variable:
meltano config tap-google-analytics set start_date YYYY-MM-DDTHH:MM:SSZ
export TAP_GOOGLE_ANALYTICS_START_DATE=YYYY-MM-DDTHH:MM:SSZ
end_date
#
-
Environment variable:
TAP_GOOGLE_ANALYTICS_END_DATE
, alias:GOOGLE_ANALYTICS_API_END_DATE
Date up to when historical data will be extracted.
How to use #
Manage this setting using Meltano UI,
meltano config
, or an
environment variable:
meltano config tap-google-analytics set end_date YYYY-MM-DDTHH:MM:SSZ
export TAP_GOOGLE_ANALYTICS_END_DATE=YYYY-MM-DDTHH:MM:SSZ
Looking for help? #
If you're having trouble getting the
tap-google-analytics
extractor to work, look for an
existing issue in its repository, file a new issue,
or
join the Meltano Slack community
and ask for help in the #plugins-general
channel.
Found an issue on this page? #
This page is generated from a YAML file that you can contribute changes to!