Ads Customer Match DAGs

Overview

The page will guide you how to configure tcrm_bq_to_ads_cm or tcrm_gcs_to_ads_cm DAG and how to prepare the data.

Customer Match lets you use your online and offline data to reach and re-engage with your customers across Search, the Shopping tab, Gmail, YouTube, and Display. Using information that your customers have shared with you, Customer Match will target ads to those customers and other customers like them.

For detail, please refer to About Customer Match

Configure Airflow Variables

Create New Necessary tcrm_bq_to_ads_cm DAG Variables

The following section indicates which variables are needed to run the tcrm_bq_to_ads_cm 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.
ads_cm_user_list_name my_name_list The name of customer match user list.
ads_upload_key_type CONTACT_INFO The upload key type that choose from CONTACT_INFO, CRM_ID, or MOBILE_ADVERTISING_ID. Please refer to UserList in Google Ads
ads_cm_create_list False True/False, indicates if creating a new list when the list isn't existing.
ads_cm_membership_lifespan 30 Number of days a user's cookie stays.
ads_cm_app_id Mobile app id for creating user list. Only required when ads_upload_key_type is MOBILE_ADVERTISING_ID.

Create New Necessary tcrm_gcs_to_ads_cm DAG Variables

The following section indicates which variables are needed to run the tcrm_gcs_to_ads_cm 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 (optional) 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.
ads_cm_user_list_name The name of customer match user list.
ads_upload_key_type The upload key type that choose from CONTACT_INFO, CRM_ID, or MOBILE_ADVERTISING_ID. Please refer to UserList in Google Ads
ads_cm_create_list True/False, indicates if creating a new list when the list isn't existing.
ads_cm_membership_lifespan Number of days a user's cookie stays.
ads_cm_app_id Mobile app id for creating user list. Only required when ads_upload_key_type is MOBILE_ADVERTISING_ID.

Prepare Data to Send to Google Ads Customer Match

To send the customer match data to Google Ads you can choose from the following 3 options, example data is based on CONTACT_INFO:

  1. From BigQuery using the tcrm_bq_to_ads_cm DAG in SQL table Format. (Example data is deliberated truncated because they are too long.)

    hashedEmail hashedFirstName hashedLastName countryCode zipCode
    f660ab91... dadbbb93... 6ccaa64... JP 1001234
  2. From Google Cloud Storage using the tcrm_gcs_to_ads_cm DAG in JSON Format.

    {'hashedEmail': 'f660ab912ec121d1b1e928a0bb4bc61b15f5ad44d5efdc4e1c92a25e99b8e44a', 'hashedFirstName': 'dadbbb9327c711e4b626f7820fb299871d23d6020683bbd1e08d37e0246c7e90', 'hashedLastName': '6ccaa6415b5ee449e3c5c716f57b4608ebe3b780f5aa6b077bc5d8eee5d961f9', 'countryCode': 'JP', 'zipCode': '1001234'}
    
  3. From Google Cloud Storage using the tcrm_gcs_to_ads_cm DAG in CSV Format.

    hashedEmail,hashedFirstName,hashedLastName,countryCode,zipCode
    f660ab912ec121d1b1e928a0bb4bc61b15f5ad44d5efdc4e1c92a25e99b8e44a,dadbbb9327c711e4b626f7820fb299871d23d6020683bbd1e08d37e0246c7e90,6ccaa6415b5ee449e3c5c716f57b4608ebe3b780f5aa6b077bc5d8eee5d961f9,JP,1001234
    

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.