Campaign Manager Offline Conversions DAGs

Overview

The page will guide you how to configure tcrm_bq_to_cm or tcrm_gcs_to_cm DAG and how to prepare the data.

In Campaign Manager 360 a conversion is recorded by a tag, known as a Floodlight activity, when a user performs a predefined action after being served an ad. Commonly tagged actions include tracking when a user purchases an item from an online store, or visits a webpage to request more information via an online form. In general, conversions tracked by Google both begin and end online.

For detail, please refer to Upload conversions

Configure Airflow Variables

Create New Necessary tcrm_bq_to_cm DAG Variables

The following table indicates which variables are needed to run the tcrm_bq_to_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.
cm_profile_id Profile id of the service account user in CM.
cm_service_account Service account authorized as Campaign Manager user.

Create New Necessary tcrm_gcs_to_cm DAG Variables

The following table indicates which variables are needed to run the tcrm_gcs_to_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.
cm_profile_id Profile id of the service account user in CM.
cm_service_account Service account authorized as Campaign Manager user.

Prepare Data to Send to Campaign Manager Offline Conversions

To send your data to Campaign Manager you can choose from the following 3 options:

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

    gclid floodlightActivityId floodlightConfigurationId ordinal timestampMicros quantity value
    cj0K... 1234567 1234567 12345678-abcd-... 1592685900000000 1 1000
  2. From Google Cloud Storage using the tcrm_gcs_to_cm DAG in JSON Format.

    {'gclid': 'cj0K...', 'floodlightActivityId': '1234567', 'floodlightConfigurationId': '1234567', 'ordinal': '12345678-abcd-...', 'timestampMicros': '12345678-abcd-...', 'ordinal':'1', 'quantity': '1000', 'value':'1000'}
    
  3. From Google Cloud Storage using the tcrm_gcs_to_cm DAG in CSV Format.

    gclid,floodlightActivityId,floodlightConfigurationId,ordinal,timestampMicros,quantity,value
    Cj0K...,1234567,1234567,12345678-abcd-abcd-abcd-0123456789ab,1592685900000000,1,1000
    

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.