airflow.providers.google.marketing_platform.hooks.analytics
¶
Module Contents¶
-
class
airflow.providers.google.marketing_platform.hooks.analytics.
GoogleAnalyticsHook
(api_version: str = 'v3', *args, **kwargs)[source]¶ Bases:
airflow.providers.google.common.hooks.base_google.GoogleBaseHook
Hook for Google Analytics 360.
-
get_ad_words_link
(self, account_id: str, web_property_id: str, web_property_ad_words_link_id: str)[source]¶ Returns a web property-Google Ads link to which the user has access.
- Parameters
account_id (string) -- ID of the account which the given web property belongs to.
web_property_id (string) -- Web property-Google Ads link UA-string.
web_property_ad_words_link_id (string) -- to retrieve the Google Ads link for.
- Returns
web property-Google Ads
- Return type
Dict
-
list_ad_words_links
(self, account_id: str, web_property_id: str)[source]¶ Lists webProperty-Google Ads links for a given web property.
-
upload_data
(self, file_location: str, account_id: str, web_property_id: str, custom_data_source_id: str, resumable_upload: bool = 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
(self, account_id: str, web_property_id: str, custom_data_source_id: str, delete_request_body: Dict[str, Any])[source]¶ Deletes the uploaded data for a given account/property/dataset
- Parameters
-