Skip to content

Commit

Permalink
Update tags in Customer Match example
Browse files Browse the repository at this point in the history
  • Loading branch information
laurachevalier4 authored and BenRKarl committed May 16, 2023
1 parent 9fa6fa4 commit 584de7c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions examples/remarketing/add_customer_match_user_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 70,8 @@ def main(client, customer_id, run_job, user_list_id, offline_user_data_job_id):
offline_user_data_job_id,
)



# [START add_customer_match_user_list_3]
def create_customer_match_user_list(client, customer_id):
"""Creates a Customer Match user list.
Expand Down Expand Up @@ -115,6 116,7 @@ def create_customer_match_user_list(client, customer_id):
)

return user_list_resource_name
# [END add_customer_match_user_list_3]


# [START add_customer_match_user_list]
Expand Down Expand Up @@ -355,18 357,19 @@ def build_offline_user_data_job_operations(client):
address_info.country_code = record["country_code"]
address_info.postal_code = record["postal_code"]
user_data.user_identifiers.append(user_identifier)
# [END add_customer_match_user_list_2]

# If the user_identifiers repeated field is not empty, create a new
# OfflineUserDataJobOperation and add the UserData to it.
if user_data.user_identifiers:
operation = client.get_type("OfflineUserDataJobOperation")
operation.create = user_data
operations.append(operation)
# [END add_customer_match_user_list_2]

return operations


# [START add_customer_match_user_list_4]
def check_job_status(client, customer_id, offline_user_data_job_resource_name):
"""Retrieves, checks, and prints the status of the offline user data job.
Expand Down Expand Up @@ -421,8 424,10 @@ def check_job_status(client, customer_id, offline_user_data_job_resource_name):
"To check the status of the job periodically, use the following "
f"GAQL query with GoogleAdsService.Search: {query}"
)
# [END add_customer_match_user_list_4]


# [START add_customer_match_user_list_5]
def print_customer_match_user_list_info(
client, customer_id, user_list_resource_name
):
Expand Down Expand Up @@ -461,6 466,7 @@ def print_customer_match_user_list_info(
"Reminder: It may take several hours for the user list to be "
"populated. Estimates of size zero are possible."
)
# [START add_customer_match_user_list_4]


def normalize_and_hash(s, remove_all_whitespace):
Expand Down

0 comments on commit 584de7c

Please sign in to comment.