Ads Customer Match DAGs

Stay organized with collections Save and categorize content based on your preferences.

Overview

The page will walk you through how to configure the tcrm_bq_to_ads_cm_v2 and tcrm_gcs_to_ads_cm_v2 DAGs, 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 Required tcrm_bq_to_ads_cm_v2 DAG Variables

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

Variable Name Example Value Variable Information
tcrm_bq_to_ads_cm_v2_bq_dataset_id my_dataset The name of the BigQuery dataset containing the data.
tcrm_bq_to_ads_cm_v2_bq_table_id my_table The name of the BigQuery table containing the data.
tcrm_bq_to_ads_cm_v2_google_ads_yaml_credentials The authentication info for Google Ads API, please refer to Google Ads API Overview for more information.
tcrm_bq_to_ads_cm_v2_ads_cm_user_list_name my_name_list The name of customer match user list.
tcrm_bq_to_ads_cm_v2_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
tcrm_bq_to_ads_cm_v2_ads_cm_create_list False True/False, indicates if creating a new list when the list isn't existing.
tcrm_bq_to_ads_cm_v2_ads_cm_membership_lifespan_in_days 30 Number of days a user's cookie stays.
tcrm_bq_to_ads_cm_v2_ads_cm_app_id Mobile app id for creating user list. Only required when ads_upload_key_type is MOBILE_ADVERTISING_ID.

Create New Required tcrm_gcs_to_ads_cm_v2 DAG Variables

The following section indicates which variables are needed to run the tcrm_gcs_to_ads_cm_v2 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
tcrm_gcs_to_ads_cm_v2_gcs_bucket_name my_bucket Cloud Storage bucket name.
tcrm_gcs_to_ads_cm_v2_gcs_bucket_prefix folder/sub_folder The path to the data folder inside the bucket.
tcrm_gcs_to_ads_cm_v2_gcs_content_type (optional) Either JSON or CSV. Cloud Storage content type.
tcrm_gcs_to_ads_cm_v2_google_ads_yaml_credentials The authentication info for Google Ads API, please refer to Google Ads API Overview for more information.
tcrm_gcs_to_ads_cm_v2_ads_cm_user_list_name my_name_list The name of customer match user list.
tcrm_gcs_to_ads_cm_v2_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
tcrm_gcs_to_ads_cm_v2_ads_cm_create_list False True/False, indicates if creating a new list when the list isn't existing.
tcrm_gcs_to_ads_cm_v2_ads_cm_membership_lifespan_in_days 30 Number of days a user's cookie stays.
tcrm_gcs_to_ads_cm_v2_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

For each upload_key_type, the data schema is slightly different.

  1. CONTACT_INFO

There are 3 subtypes of data schema:

Matching by hashedEmail:

CustomerId hashedEmail
1234567890 dadbbb93...

Matching by hashedPhoneNumber:

CustomerId hashedEmail
1234567890 dadbbb93...

Matching by addressInfo:

CustomerId hashedFirstName hashedLastName countryCode postalCode
1234567890 dadbbb9337941ad abcd97af923499 JP 1031103
  1. MOBILE_ADVERTISING_ID

Matching by mobileId

CustomerId mobileId
1234567890 12345678-1234-1234-abcdef123456
  1. CRM_ID

Matching by thirdPartyUserId

CustomerId thirdPartyUserId
1234567890 id_defined_in_your_organization

For data storage, there are 2 types, BigQuery table or Google Cloud Storage

  1. From BigQuery using the tcrm_bq_to_ads_cm_v2 DAG in SQL table Format. (Example data is deliberately truncated because of length.)

    CustomerId hashedEmail
    1234567890 dadbbb93...
  2. From Google Cloud Storage using the tcrm_gcs_to_ads_cm_v2 DAG in JSON Format.

    {'customerId': '1234567890', 'hashedEmail': 'f660ab912ec121d1b1e928a0bb4bc61b15f5ad44d5efdc4e1c92a25e99b8e44a'}
    
  3. From Google Cloud Storage using the tcrm_gcs_to_ads_cm_v2 DAG in CSV Format.

    customerId,hashedEmail
    1234567890,dadbbb9327c711e4b626f7820fb299871d23d6020683bbd1e08d37e0246c7e90
    

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.