Ads Offline Conversions DAGs

Overview

The page will guide you how to configure tcrm_bq_to_ads_oc or tcrm_gcs_to_ads_oc DAG and how to prepare the data.

Sometimes, an ad doesn't lead directly to an online sale, but instead starts a customer down a path that ultimately leads to a sale in the offline world, such as at your office or over the phone. By importing offline conversions, you can measure what happens in the offline world after your ad results in a click or call to your business.

For detail, please refer to About offline conversion imports

Configure Airflow Variables

Create New Necessary tcrm_bq_to_ads_oc DAG Variables

The following section indicates which variables are needed to run the tcrm_bq_to_ads_oc DAG. You only need to set up these variables if you plan to use BigQuery as your data source.

Variable Name Default Value Variable Information
bq_dataset_id my_dataset The name of the BigQuery dataset containing the data.
bq_table_id my_table The name of the BigQuery table containing the data.
ads_credentials The authentication info for Google Adwords API, please refer to Create ads_credentials YAML string for Google Ads Authentication for more information.

Create New Necessary tcrm_gcs_to_ads_oc DAG Variables

The following section indicates which variables are needed to run the tcrm_gcs_to_ads_oc DAG. You only need to set up these variables if you plan to use Google Cloud Storage as your data source.

Variable Name Example Value Variable Information
gcs_bucket_name my_bucket Cloud Storage bucket name.
gcs_bucket_prefix folder/sub_folder The path to the data folder inside the bucket.
gcs_content_type Either JSON or CSV. Cloud Storage content type.
ads_credentials The authentication info for Google Adwords API, please refer to Create ads_credentials YAML string for Google Ads Authentication for more information.

Prepare Data to Send to Google Ads Offline Conversion

To send your data to Google Ads you can choose from the following 3 options:

  1. From BigQuery using the tcrm_bq_to_ads_oc DAG in SQL table Format.

  2. From Google Cloud Storage using the tcrm_gcs_to_ads_oc DAG in JSON Format.

    {"conversionName": "my_conversion_1", "conversionTime":"20191030 122301 Asia/Calcutta", "conversionValue": "0.47", "googleClickId": "gclid1"}
    {"conversionName": "my_conversion_1", "conversionTime":"20191030 122401 Asia/Calcutta", "conversionValue": "0.37", "googleClickId": "gclid2"}
    {"conversionName": "my_conversion_2", "conversionTime":"20191030 122501 Asia/Calcutta", "conversionValue": "0.41", "googleClickId": "gclid3"}
    {"conversionName": "my_conversion_2", "conversionTime":"20191030 122601 Asia/Calcutta", "conversionValue": "0.17", "googleClickId": "gclid4"}
    
  3. From Google Cloud Storage using the tcrm_gcs_to_ads_oc DAG in CSV Format.

    conversionName,conversionTime,conversionValue,googleClickId
    my_conversion_1,20191030 122301 Asia/Calcutta,0.47,gclid1
    my_conversion_1,20191030 122401 Asia/Calcutta,0.37,gclid2
    my_conversion_2,20191030 122501 Asia/Calcutta,0.41,gclid3
    my_conversion_2,20191030 122601 Asia/Calcutta,0.17,gclid4
    

Run Your DAG

In the Airflow console click on the DAGs option from the top menu bar. Find the DAG you’d like to run in the list on the left. Then run it by clicking the Play button on the right side of the list.

Reading DAG's Logs

Please refer to Reading DAG's Logs in FAQ.