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-googleadsTo use standalone, you can use the following:
pip install https://github.com/Matatika/tap-googleads.gitA full list of supported settings and capabilities for this tap is available by running:
tap-googleads --aboutHow 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_idoauth_credentials.client_secretoauth_credentials.refresh_tokendeveloper_token
Optional settings:
customer_idscustomer_idlogin_customer_idstart_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_idoauth_credentials_client_secretoauth_credentials.authorization_urloauth_credentials.scopeoauth_credentials.access_tokenoauth_credentials.refresh_tokenoauth_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.jsonpipx install poetry
poetry installCreate tests within the tap_googleads/tests subfolder and
then run:
poetry run pytestYou can also test the tap-googleads CLI interface directly using poetry run:
poetry run tap-googleads --helpTesting 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 installNow 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-jsonlSee the dev guide for more instructions on how to use the SDK to develop your own taps and targets.