Skip to content

Commit 310a10b

Browse files
committed
Changes for release v15_0.
1 parent eb2b981 commit 310a10b

File tree

1,522 files changed

+232523
-525
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,522 files changed

+232523
-525
lines changed

ChangeLog

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
* 22.1.0
2+
- Google Ads API v15 release.
3+
- Add configuration option allowing developer token to be ignored.
4+
- Make "impersonation_email" an optional configuration for service accounts.
5+
- Redact PII fields from new LocalServicesLead and LocalServicesLeadConversation in logs.
6+
- Add DMA consent to conversions and Customer Match examples.
7+
- Update enhanced conversions examples to fit with for-leads and for-web workflows.
8+
- Update usage of ProductBiddingCategoryConstant to ProductCategoryConstant in examples.
9+
110
* 22.0.0
211
- Remove support for Google Ads API v12.
312

examples/account_management/approve_merchant_center_link.py

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
To run this code example, you must use the Merchant Center UI or the Content
2222
API for Shopping to send a link request between your Merchant Center and Google
2323
Ads accounts.
24+
25+
NOTE: This code example uses version v14 of the Google Ads API. Version v15 of
26+
the Google Ads API replaces MerchantCenterLinkService with
27+
ProductLinkInvitationService and ProductLinkService. We will add new code
28+
examples using these services shortly.
2429
"""
2530

2631
import argparse

examples/account_management/create_customer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def main(client, manager_customer_id):
5858
if __name__ == "__main__":
5959
# GoogleAdsClient will read the google-ads.yaml configuration file in the
6060
# home directory if none is specified.
61-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
61+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
6262

6363
parser = argparse.ArgumentParser(
6464
description=("Creates a new client under the given manager.")

examples/account_management/get_account_hierarchy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def print_account_hierarchy(
179179
if __name__ == "__main__":
180180
# GoogleAdsClient will read the google-ads.yaml configuration file in the
181181
# home directory if none is specified.
182-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
182+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
183183

184184
parser = argparse.ArgumentParser(
185185
description="This example gets the account hierarchy of the specified "

examples/account_management/get_change_details.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def main(client, customer_id):
186186
if __name__ == "__main__":
187187
# GoogleAdsClient will read the google-ads.yaml configuration file in the
188188
# home directory if none is specified.
189-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
189+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
190190

191191
parser = argparse.ArgumentParser(
192192
description="This example gets specific details about the most recent "

examples/account_management/get_change_summary.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def main(client, customer_id):
8585
if __name__ == "__main__":
8686
# GoogleAdsClient will read a google-ads.yaml configuration file in the
8787
# home directory if none is specified.
88-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
88+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
8989

9090
parser = argparse.ArgumentParser(
9191
description=(

examples/account_management/invite_user_with_access_role.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def main(client, customer_id, email_address, access_role):
5959
if __name__ == "__main__":
6060
# GoogleAdsClient will read the google-ads.yaml configuration file in the
6161
# home directory if none is specified.
62-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
62+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
6363

6464
parser = argparse.ArgumentParser(
6565
description=(

examples/account_management/link_manager_to_client.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,12 @@ def main(client, customer_id, manager_customer_id):
8585
)
8686
manager_link_operation = client.get_type("CustomerManagerLinkOperation")
8787
manager_link = manager_link_operation.update
88-
manager_link.resource_name = customer_manager_link_service.customer_manager_link_path(
89-
customer_id, manager_customer_id, manager_link_id,
88+
manager_link.resource_name = (
89+
customer_manager_link_service.customer_manager_link_path(
90+
customer_id,
91+
manager_customer_id,
92+
manager_link_id,
93+
)
9094
)
9195

9296
manager_link.status = client.enums.ManagerLinkStatusEnum.ACTIVE
@@ -108,7 +112,7 @@ def main(client, customer_id, manager_customer_id):
108112
if __name__ == "__main__":
109113
# GoogleAdsClient will read the google-ads.yaml configuration file in the
110114
# home directory if none is specified.
111-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
115+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
112116

113117
parser = argparse.ArgumentParser(
114118
description=(

examples/account_management/list_accessible_customers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def main(client):
4444
if __name__ == "__main__":
4545
# GoogleAdsClient will read the google-ads.yaml configuration file in the
4646
# home directory if none is specified.
47-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
47+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
4848

4949
try:
5050
main(googleads_client)

examples/account_management/reject_merchant_center_link.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
Shopping to send a link request between your Merchant Center and Google Ads
2323
accounts. You can find detailed instructions to link your Merchant Center and
2424
Google Ads accounts here: https://support.google.com/merchants/answer/6159060.
25+
26+
NOTE: This code example uses version v14 of the Google Ads API. Version v15 of
27+
the Google Ads API replaces MerchantCenterLinkService with
28+
ProductLinkInvitationService and ProductLinkService. We will add new code
29+
examples using these services shortly.
2530
"""
2631

2732
import argparse
@@ -45,8 +50,10 @@ def main(client, customer_id, merchant_center_account_id):
4550
"MerchantCenterLinkService"
4651
)
4752
# Get the extant customer account to Merchant Center account links.
48-
list_merchant_center_links_response = merchant_center_link_service.list_merchant_center_links(
49-
customer_id=customer_id
53+
list_merchant_center_links_response = (
54+
merchant_center_link_service.list_merchant_center_links(
55+
customer_id=customer_id
56+
)
5057
)
5158

5259
number_of_links = len(

examples/account_management/update_user_access.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ def modify_user_access(client, customer_id, user_id, access_role):
113113
customer_user_access_op = client.get_type("CustomerUserAccessOperation")
114114
access_role_enum = client.enums.AccessRoleEnum
115115
customer_user_access = customer_user_access_op.update
116-
customer_user_access.resource_name = customer_user_access_service.customer_user_access_path(
117-
customer_id, user_id
116+
customer_user_access.resource_name = (
117+
customer_user_access_service.customer_user_access_path(
118+
customer_id, user_id
119+
)
118120
)
119121
customer_user_access.access_role = getattr(access_role_enum, access_role)
120122
client.copy_from(
@@ -135,7 +137,7 @@ def modify_user_access(client, customer_id, user_id, access_role):
135137
if __name__ == "__main__":
136138
# GoogleAdsClient will read the google-ads.yaml configuration file in the
137139
# home directory if none is specified.
138-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
140+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
139141

140142
parser = argparse.ArgumentParser(
141143
description="This code example updates the access role of a user, "

examples/advanced_operations/add_ad_customizer.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def create_ad_with_customizations(
263263
if __name__ == "__main__":
264264
# GoogleAdsClient will read the google-ads.yaml configuration file in the
265265
# home directory if none is specified.
266-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
266+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
267267

268268
parser = argparse.ArgumentParser(
269269
description=(
@@ -281,7 +281,11 @@ def create_ad_with_customizations(
281281
help="The Google Ads customer ID.",
282282
)
283283
parser.add_argument(
284-
"-a", "--ad_group_id", type=str, required=True, help="An ad group ID.",
284+
"-a",
285+
"--ad_group_id",
286+
type=str,
287+
required=True,
288+
help="An ad group ID.",
285289
)
286290
args = parser.parse_args()
287291

examples/advanced_operations/add_ad_group_bid_modifier.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ def main(client, customer_id, ad_group_id, bid_modifier_value):
5151

5252
# Add the ad group bid modifier.
5353
ad_group_bm_response = ad_group_bm_service.mutate_ad_group_bid_modifiers(
54-
customer_id=customer_id, operations=[ad_group_bid_modifier_operation],
54+
customer_id=customer_id,
55+
operations=[ad_group_bid_modifier_operation],
5556
)
5657
# [END add_ad_group_bid_modifier]
5758

@@ -64,7 +65,7 @@ def main(client, customer_id, ad_group_id, bid_modifier_value):
6465
if __name__ == "__main__":
6566
# GoogleAdsClient will read the google-ads.yaml configuration file in the
6667
# home directory if none is specified.
67-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
68+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
6869

6970
parser = argparse.ArgumentParser(
7071
description=(

examples/advanced_operations/add_app_campaign.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ def set_campaign_targeting_criteria(
183183
)
184184
campaign_criterion = campaign_criterion_operation.create
185185
campaign_criterion.campaign = campaign_resource_name
186-
campaign_criterion.location.geo_target_constant = geo_target_constant_service.geo_target_constant_path(
187-
location_id
186+
campaign_criterion.location.geo_target_constant = (
187+
geo_target_constant_service.geo_target_constant_path(location_id)
188188
)
189189
campaign_criterion_operations.append(campaign_criterion_operation)
190190

@@ -195,8 +195,8 @@ def set_campaign_targeting_criteria(
195195
)
196196
campaign_criterion = campaign_criterion_operation.create
197197
campaign_criterion.campaign = campaign_resource_name
198-
campaign_criterion.language.language_constant = googleads_service.language_constant_path(
199-
language_id
198+
campaign_criterion.language.language_constant = (
199+
googleads_service.language_constant_path(language_id)
200200
)
201201
campaign_criterion_operations.append(campaign_criterion_operation)
202202

@@ -295,7 +295,7 @@ def create_ad_text_asset(client, text):
295295
if __name__ == "__main__":
296296
# GoogleAdsClient will read the google-ads.yaml configuration file in the
297297
# home directory if none is specified.
298-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
298+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
299299

300300
parser = argparse.ArgumentParser(
301301
description=(

examples/advanced_operations/add_bidding_data_exclusion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def main(client, customer_id, start_date_time, end_date_time):
8080
if __name__ == "__main__":
8181
# GoogleAdsClient will read the google-ads.yaml configuration file in the
8282
# home directory if none is specified.
83-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
83+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
8484

8585
parser = argparse.ArgumentParser(
8686
description="Adds a data exclusion for conversions in Smart Bidding "

examples/advanced_operations/add_bidding_seasonality_adjustment.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def main(
9494
if __name__ == "__main__":
9595
# GoogleAdsClient will read the google-ads.yaml configuration file in the
9696
# home directory if none is specified.
97-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
97+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
9898

9999
parser = argparse.ArgumentParser(
100100
description="Adds a seasonality adjustment for conversions in Smart "

examples/advanced_operations/add_call_ad.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def main(
101101
if __name__ == "__main__":
102102
# GoogleAdsClient will read the google-ads.yaml configuration file in the
103103
# home directory if none is specified.
104-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
104+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
105105

106106
parser = argparse.ArgumentParser(
107107
description=("Adds a call extension to a specific account.")
@@ -115,7 +115,11 @@ def main(
115115
help="The Google Ads customer ID.",
116116
)
117117
parser.add_argument(
118-
"-a", "--ad_group_id", type=str, required=True, help="An ad group ID.",
118+
"-a",
119+
"--ad_group_id",
120+
type=str,
121+
required=True,
122+
help="An ad group ID.",
119123
)
120124
parser.add_argument(
121125
"-n",

examples/advanced_operations/add_display_upload_ad.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def create_display_upload_ad_group_ad(
150150
if __name__ == "__main__":
151151
# GoogleAdsClient will read the google-ads.yaml configuration file in the
152152
# home directory if none is specified.
153-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
153+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
154154

155155
parser = argparse.ArgumentParser(
156156
description="Adds a display upload ad to a given ad group."

examples/advanced_operations/add_dynamic_page_feed_asset.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,13 @@ def add_dsa_target(client, customer_id, ad_group_id, dsa_page_url_label):
260260
if __name__ == "__main__":
261261
# GoogleAdsClient will read the google-ads.yaml configuration file in the
262262
# home directory if none is specified.
263-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
263+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
264264

265-
parser = argparse.ArgumentParser(description=(
266-
"Adds a page feed with URLs for a Dynamic Search Ads campaign"
267-
))
265+
parser = argparse.ArgumentParser(
266+
description=(
267+
"Adds a page feed with URLs for a Dynamic Search Ads campaign"
268+
)
269+
)
268270
# The following argument(s) should be provided to run the example.
269271
parser.add_argument(
270272
"-c",

examples/advanced_operations/add_dynamic_search_ads.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def add_webpage_criterion(client, customer_id, ad_group_resource_name):
260260
if __name__ == "__main__":
261261
# GoogleAdsClient will read the google-ads.yaml configuration file in the
262262
# home directory if none is specified.
263-
googleads_client = GoogleAdsClient.load_from_storage(version="v14")
263+
googleads_client = GoogleAdsClient.load_from_storage(version="v15")
264264

265265
parser = argparse.ArgumentParser(
266266
description=(

0 commit comments

Comments
 (0)