airflow.providers.google.marketing_platform.hooks.analytics
¶
Module Contents¶
Classes¶
Hook for Google Analytics 360. |
- class airflow.providers.google.marketing_platform.hooks.analytics.GoogleAnalyticsHook(api_version='v3', *args, **kwargs)[source]¶
Bases:
airflow.providers.google.common.hooks.base_google.GoogleBaseHook
Hook for Google Analytics 360.
- get_ad_words_link(account_id, web_property_id, web_property_ad_words_link_id)[source]¶
Returns a web property-Google Ads link to which the user has access.
- list_ad_words_links(account_id, web_property_id)[source]¶
Lists webProperty-Google Ads links for a given web property.
- upload_data(file_location, account_id, web_property_id, custom_data_source_id, resumable_upload=False)[source]¶
Uploads file to GA via the Data Import API.
- Parameters
file_location (str) – The path and name of the file to upload.
account_id (str) – The GA account Id to which the data upload belongs.
web_property_id (str) – UA-string associated with the upload.
custom_data_source_id (str) – Custom Data Source Id to which this data import belongs.
resumable_upload (bool) – flag to upload the file in a resumable fashion, using a series of at least two requests.
- delete_upload_data(account_id, web_property_id, custom_data_source_id, delete_request_body)[source]¶
Deletes the uploaded data for a given account/property/dataset.
- Parameters
- list_uploads(account_id, web_property_id, custom_data_source_id)[source]¶
Get list of data upload from GA.
- Parameters
account_id – The GA account Id to which the data upload belongs.
web_property_id – UA-string associated with the upload.
custom_data_source_id – Custom Data Source Id to which this data import belongs.