tap-googleads
is a Singer tap for GoogleAds.
This fork of tap-googleads
will sync your GoogleAds data under the specified customer_id
.
Built with the Meltano Tap SDK for Singer Taps.
To install and use this tap with Meltano:
meltano add extractor tap-googleads
To use standalone, you can use the following:
pip install https://github.com/Matatika/tap-googleads.git
A full list of supported settings and capabilities for this tap is available by running:
tap-googleads --about
How to get these settings can be found in the following Google Ads documentation:
https://developers.google.com/adwords/api/docs/guides/authentication
https://developers.google.com/google-ads/api/docs/first-call/dev-token
Required settings:
oauth_credentials.client_id
oauth_credentials.client_secret
oauth_credentials.refresh_token
developer_token
Optional settings:
customer_ids
customer_id
login_customer_id
start_date
(default: 90 days before the current date)end_date
(default: the current date)enable_click_view_report_stream
(default:false
)
Config for settings that refer to a customer ID should be provided as a string comprising of 10 numeric characters (e.g. 123-456-7890
or 1234567890
).
If customer_ids
is provided, the tap will sync get data for the corrsponding customer accounts only. The same is true for customer_id
but for a single customer account. If both are provided, customer_ids
takes precedence. If neither are provided, all customer accounts available to the authenticated principal are synced.
If authenticated as a manager account, login_customer_id
should be set to the customer ID of the manager account.
To run the tap yourself It is highly recommended to use the Using Your Own Credentials section listed above.
These settings for handling your credentials through a Proxy OAuth Server, these settings are used by default in a Matatika workspace.
The benefit to using these settings in your Matatika workspace is that you do not have to get or provide any of the OAuth credentials. All a user needs to do it allow the Matatika App permissions to access your GoogleAds data, and choose what customer_id
you want to get data from.
All you need to provide in your Matatika workspace are:
- Permissions for our app to access your google account through an OAuth screen
customer_id
(required)start_date
(optional)end_date
(optional)
These are not intended for a user to set manually, as such setting them could cause some config conflicts that will now allow the tap to work correctly.
Also set in by default in your Matatika workspace environment:
oauth_credentials.client_id
oauth_credentials_client_secret
oauth_credentials.authorization_url
oauth_credentials.scope
oauth_credentials.access_token
oauth_credentials.refresh_token
oauth_credentials.refresh_proxy_url
You can easily run tap-googleads
by itself or in a pipeline using Meltano.
tap-googleads --version
tap-googleads --help
tap-googleads --config CONFIG --discover > ./catalog.json
pipx install poetry
poetry install
Create tests within the tap_googleads/tests
subfolder and
then run:
poetry run pytest
You can also test the tap-googleads
CLI interface directly using poetry run
:
poetry run tap-googleads --help
Testing with Meltano
Note: This tap will work in any Singer environment and does not require Meltano. Examples here are for convenience and to streamline end-to-end orchestration scenarios.
Your project comes with a custom meltano.yml
project file already created. Open the meltano.yml
and follow any "TODO" items listed in
the file.
Next, install Meltano (if you haven't already) and any needed plugins:
# Install meltano
pipx install meltano
# Initialize meltano within this directory
cd tap-googleads
meltano install
Now you can test and orchestrate using Meltano:
# Test invocation:
meltano invoke tap-googleads --version
# OR run a test `elt` pipeline:
meltano elt tap-googleads target-jsonl
See the dev guide for more instructions on how to use the SDK to develop your own taps and targets.