No project description provided
Project description
gaarf exporter
Prometheus exporter for Google Ads metrics with customizable metrics collectors.
Installation and usage
Locally
- Install
gaarf-exporter
from pip:
pip install gaarf-exporter
- Run
gaarf-exporter
:
gaarf-exporter
Docker
docker run --network=host \
-v /path/to/google-ads.yaml:/root/google-ads.yaml \
-v `pwd`/gaarf_exporter.yaml:/app/gaarf_exporter.yaml \
gaarf_exporter
docker run --network=host gaarf_exporter \
--config gs://path/to/gaarf_config.yaml \
--ads-config gs://path/to/google-ads.yaml
--network=host
By default it will start http_server on localhost:8000
and will push some basic metrics to it.
Customization
--ads-config
- path togoogle-ads.yaml
--config
- path togaarf_exporter.yaml
--http_server.address
- address of your http server (localhost
by default)--http_server.port
- port of your http server (8000
by default)--pushgateway.address
- address of your pushgateway service (None
by default)--pushgateway.port
- port of your pushgateway (None
by default)--delay-minutes
- delay in minutes between scrapings (15
by default)
Customizing with macros:
Customizing fetching dates
By default gaarf-exporter
fetches performance data for TODAY; if you want to
customize it you can provide optional flags:
--macro.start_date=:YYYYMMDD-N
, whereN
is number of days starting from today--macro.end_date=:YYYYMMDD-M
, whereN
is number of days starting from today
It will add an additional metric to be exposed to Prometheus *_n_days
(i.e.
googleads_clicks_n_days
.
Collectors
You can specify collectors with --collectors <collector_name>
CLI argument. Some collectors available by default, other you need to specify explicitly.
default
registry.
performance
- extractclicks
,impressions
,cost
,conversions
on byad_network
andad_group_id
disapprovals
- extractapproval_status
,review_status
,topic
,topic_type
byad_group_id
andad_id
only for not approved adsconversion_action
- extractall_conversions
byconversion_id
andaccount_id
mapping
- performance mapping betweenad_group_id
,ad_group_name
,campaign_id
,campaign_name,
campaign_status
,account_id
,account_name
disapprovals
registry.
disapprovals
- extractapproval_status
,review_status
,topic
,topic_type
byad_group_id
andad_id
only for not approved adsad_group_ad_asset_disapprovals
- extractapproval_status
,review_status
,topic
,topic_type
byad_group_id
andasset_id
only for enabled assets.sitelink_disapprovals
- extractapproval_status
,review_status
,topic
,topic_type
byasset_id
,sitelink_title
and both sitelink descriptions only for not approved sitelinks.
app
registry.
app_campaign_mapping
- performs mapping betweencampaign_id
,app_id
,app_store
,and bidding_strategy
only for active campaigns.asset_performance
- extractclicks
,impressions
,cost
,installs
,inapps
, andconversions_value
byad_group_id
,ad_network
andasset_id
asset_perf_label
- extractperformance_label
byad_group_id
andasset_id
pmax
registry.
pmax_mapping
- performs mapping betweenasset_group_id
,asset_group_name
, and meta information on campaign and account only for active campaigns and enabled asset groups.
search
registry.
search_terms
- extractclicks
,impressions
,cost
,conversions
on bysearch_term
andad_group_id
search_terms_conversion_split
- extractall_conversions
bysearch_term
andconversion_id
onad_group_id
levelkeywords
- extractclicks
,impressions
,cost
,conversions
, andhistorical auality_score
bykeyword
andmatch_type
on ad_group level.keywords_conversion_split
- extractall_conversions
bykeyword
andmatch_type
on ad_group level.
search
registry.
placements
- extractclicks
,impressions
,cost
,conversions
on byplacement_name
andplacement_type
for each account.placements_conversion_split
- extractall_conversions
byplacement_type
andplacement_type
for each account.
demographics
registry.
age
- extractclicks
,impressions
,cost
,conversions
byage_range
andcampaign_id
age_conversion_split
- extractall_conversions
byage_range
andconversion_id
oncampaign_id
levelgender
- extractclicks
,impressions
,cost
,conversions
bygender
andcampaign_id
gender_conversion_split
- extractall_conversions
bygender
andconversion_id
oncampaign_id
level
geo
registry.
user_location
- extractclicks
,impressions
,cost
,conversions
bycountry_id
andcampaign_id
only for active campaigns.user_location_conversion_split
- extractall_conversions
bycountry_id
andcampaign_id
only for active campaigns.
all
registry.
bid_budgets
- extract current values of bid (target_cpa, target_roas) and budgetaccount_status
- extractcustomer_status
for each account.campaign_service_status
- extractprimary_status
for each campaign.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gaarf-exporter-0.7.0.dev1.tar.gz
.
File metadata
- Download URL: gaarf-exporter-0.7.0.dev1.tar.gz
- Upload date:
- Size: 26.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 899a5dc78155b2da81b1cd72e72ce754455f1a38300fde453d0491f59841adfb |
|
MD5 | 176ba82b7a152e9e0a76e262120cfa83 |
|
BLAKE2b-256 | a6673fd9c0963ce6ebfb40a8f68cd5fe46e0cce729d1affb60b35228449fe62f |
File details
Details for the file gaarf_exporter-0.7.0.dev1-py3-none-any.whl
.
File metadata
- Download URL: gaarf_exporter-0.7.0.dev1-py3-none-any.whl
- Upload date:
- Size: 38.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be84d736a737809aa703eadc791b6773a74038bfbfabd2692087df32044bd8c8 |
|
MD5 | 45f697bddfb71dbc3019b914afc7e5fd |
|
BLAKE2b-256 | 3b644888d886589a7119600a4c4652cf6e2d339a613815356efd1afb9f444060 |