| :py:mod:`airflow.providers.google.marketing_platform.hooks.analytics` |
| ===================================================================== |
| |
| .. py:module:: airflow.providers.google.marketing_platform.hooks.analytics |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.google.marketing_platform.hooks.analytics.GoogleAnalyticsHook |
| |
| |
| |
| |
| .. py:class:: GoogleAnalyticsHook(api_version = 'v3', *args, **kwargs) |
| |
| Bases: :py:obj:`airflow.providers.google.common.hooks.base_google.GoogleBaseHook` |
| |
| Hook for Google Analytics 360. |
| |
| .. py:method:: get_conn(self) |
| |
| Retrieves connection to Google Analytics 360. |
| |
| |
| .. py:method:: list_accounts(self) |
| |
| Lists accounts list from Google Analytics 360. |
| |
| |
| .. py:method:: get_ad_words_link(self, account_id, web_property_id, web_property_ad_words_link_id) |
| |
| Returns a web property-Google Ads link to which the user has access. |
| |
| :param account_id: ID of the account which the given web property belongs to. |
| :param web_property_id: Web property-Google Ads link UA-string. |
| :param web_property_ad_words_link_id: to retrieve the Google Ads link for. |
| |
| :returns: web property-Google Ads |
| :rtype: Dict |
| |
| |
| .. py:method:: list_ad_words_links(self, account_id, web_property_id) |
| |
| Lists webProperty-Google Ads links for a given web property. |
| |
| :param account_id: ID of the account which the given web property belongs to. |
| :param web_property_id: Web property UA-string to retrieve the Google Ads links for. |
| |
| :returns: list of entity Google Ads links. |
| :rtype: list |
| |
| |
| .. py:method:: upload_data(self, file_location, account_id, web_property_id, custom_data_source_id, resumable_upload = False) |
| |
| Uploads file to GA via the Data Import API |
| |
| :param file_location: The path and name of the file to upload. |
| :param account_id: The GA account Id to which the data upload belongs. |
| :param web_property_id: UA-string associated with the upload. |
| :param custom_data_source_id: Custom Data Source Id to which this data import belongs. |
| :param resumable_upload: flag to upload the file in a resumable fashion, using a |
| series of at least two requests. |
| |
| |
| .. py:method:: delete_upload_data(self, account_id, web_property_id, custom_data_source_id, delete_request_body) |
| |
| Deletes the uploaded data for a given account/property/dataset |
| |
| :param account_id: The GA account Id to which the data upload belongs. |
| :param web_property_id: UA-string associated with the upload. |
| :param custom_data_source_id: Custom Data Source Id to which this data import belongs. |
| :param delete_request_body: Dict of customDataImportUids to delete. |
| |
| |
| .. py:method:: list_uploads(self, account_id, web_property_id, custom_data_source_id) |
| |
| Get list of data upload from GA |
| |
| :param account_id: The GA account Id to which the data upload belongs. |
| :param web_property_id: UA-string associated with the upload. |
| :param custom_data_source_id: Custom Data Source Id to which this data import belongs. |
| |
| |
| |