Overview
The page will walk you through how to configure the tcrm_bq_to_ads_oc_v2
and
tcrm_gcs_to_ads_oc_v2
DAGs, 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_v2
DAG Variables
The following section indicates which variables are needed to run the
tcrm_bq_to_ads_oc_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_oc_v2_bq_dataset_id |
my_dataset |
The name of the BigQuery dataset containing the data. |
tcrm_bq_to_ads_oc_v2_bq_table_id |
my_table |
The name of the BigQuery table containing the data. |
tcrm_bq_to_ads_OC_v2_google_ads_yaml_credentials |
The authentication info for Google Ads API, please refer to Google Ads API Overview for more information. |
Create New Required tcrm_gcs_to_ads_oc_v2
DAG Variables
The following section indicates which variables are needed to run the
tcrm_gcs_to_ads_oc_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_oc_v2_gcs_bucket_name |
my_bucket |
Cloud Storage bucket name. |
tcrm_gcs_to_ads_oc_v2_gcs_bucket_prefix |
folder/sub_folder |
The path to the data folder inside the bucket. |
tcrm_gcs_to_ads_oc_v2_gcs_content_type (optional) |
Either JSON or CSV . |
Cloud Storage content type. |
tcrm_gcs_to_ads_oc_v2_google_ads_yaml_credentials |
The authentication info for Google Ads API, please refer to Google Ads API Overview for more information. |
Prepare Data to Send to Google Ads Offline Conversion
Data field explanations:
customerId is the ID of the customer performing the upload.
conversionActionId is the ID of the conversion action associated with this
conversion. You can find the id in the url for a specific conversion. Please
refer to the screenshot. To view the page. Click on TOOLS AND SETTINGS
on the
top menu > click on the Conversion
under MEASUREMENT
in the popup > click on
the Conversion action
where the offline click conversions will be sent.
conversionDateTime must be the pattern of yyyy-mm-dd hh:mm:ss+|-hh:mm
To send your data to Google Ads you can choose from the following 3 options:
From BigQuery using the
tcrm_bq_to_ads_oc_v2
DAG in SQL table Format.Table schema:
Field name Type customerId STRING conversionActionId STRING gclid STRING conversionValue STRING conversionDateTime STRING Example table:
customerId conversionActionId gclid conversionValue conversionDateTime 1234567890 123456789 gclick_id_1 0.1 2022-01-11 18:00:00+0900 1234567890 123456789 gclick_id_2 0.2 2022-01-12 18:00:00+0900 1234567890 123456789 gclick_id_3 0.3 2022-01-13 18:00:00+0900 1234567890 123456789 gclick_id_4 0.4 2022-01-14 18:00:00+0900 From Google Cloud Storage using the
tcrm_gcs_to_ads_oc_v2
DAG in JSON Format.{"customerId": "1234567890", "conversionActionId": "123456789", "gclid": "gclick_id_1", "conversionValue":"0.1", "conversionDateTime": "2022-01-11 18:00:00+0900"} {"customerId": "1234567890", "conversionActionId": "123456789", "gclid": "gclick_id_2", "conversionValue":"0.2", "conversionDateTime": "2022-01-12 18:00:00+0900"} {"customerId": "1234567890", "conversionActionId": "123456789", "gclid": "gclick_id_3", "conversionValue":"0.3", "conversionDateTime": "2022-01-13 18:00:00+0900"} {"customerId": "1234567890", "conversionActionId": "123456789", "gclid": "gclick_id_4", "conversionValue":"0.4", "conversionDateTime": "2022-01-14 18:00:00+0900"}
From Google Cloud Storage using the
tcrm_gcs_to_ads_oc_v2
DAG in CSV Format.customerId,conversionActionId,googleClickId,conversionValue,conversionTime 1234567890,123456789,gclick_id_1,0.1,2022-01-11 18:00:00+0900 1234567890,123456789,gclick_id_2,0.2,2022-01-12 18:00:00+0900 1234567890,123456789,gclick_id_3,0.3,2022-01-13 18:00:00+0900 1234567890,123456789,gclick_id_4,0.4,2022-01-14 18:00:00+0900
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.