Skip to content

Commit 462f0e9

Browse files
authored
Changes for release v21_0. (#522)
1 parent b3ddf5b commit 462f0e9

File tree

2,585 files changed

+108617
-118934
lines changed

Some content is hidden

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

2,585 files changed

+108617
-118934
lines changed

CHANGELOG.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
35.0.0
2+
-----
3+
- Compatibility with v21, v20.1, v19.2 of the API: https://developers.google.com/google-ads/api/docs/release-notes
4+
- Removed support for v18.
5+
- Updated examples to include the `containsEuPoliticalAdvertising` field on campaign creation.
6+
17
34.2.0
28
-----
3-
- Add a minimum version for standard
4-
- Remove allocation_tracer
5-
- Update gapic-common to 1.0.1
9+
- Added a minimum version for standard
10+
- Removed allocation_tracer
11+
- Updated gapic-common to 1.0.1
612

713
34.1.0
814
-----
9-
- Update activesupport version to 7.1
10-
- Increase upper bound for google-protobuf and gapic-common dependencies
15+
- Updated activesupport version to 7.1
16+
- Increased upper bound for google-protobuf and gapic-common dependencies
1117

1218
34.0.0
1319
-----
@@ -17,7 +23,7 @@
1723
33.1.0
1824
-----
1925
- Improved the logging format to include more information and increase human readability.
20-
- Update Ruby version in .gemspec file to require a minimum version of 3.0.0
26+
- Updated Ruby version in .gemspec file to require a minimum version of 3.0.0
2127

2228
33.0.0
2329
------

examples/advanced_operations/add_app_campaign.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,18 @@ def create_campaign(client, customer_id, budget_resource_name)
7373
campaign = client.resource.campaign do |c|
7474
c.name = "Interplanetary Cruise App #{(Time.now.to_f * 1000).to_i}"
7575
c.campaign_budget = budget_resource_name
76+
7677
# Recommendation: Set the campaign to PAUSED when creating it to
7778
# prevent the ads from immediately serving. Set to ENABLED once you've
7879
# added targeting and the ads are ready to serve.
7980
c.status = :PAUSED
81+
8082
# All App campaigns have an advertising_channel_type of
8183
# MULTI_CHANNEL to reflect the fact that ads from these campaigns are
8284
# eligible to appear on multiple channels.
8385
c.advertising_channel_type = :MULTI_CHANNEL
8486
c.advertising_channel_sub_type = :APP_CAMPAIGN
87+
8588
# Sets the target CPA to $1 / app install.
8689
#
8790
# campaign_bidding_strategy is a 'oneof' message so setting target_cpa
@@ -92,13 +95,20 @@ def create_campaign(client, customer_id, budget_resource_name)
9295
c.target_cpa = client.resource.target_cpa do |tcpa|
9396
tcpa.target_cpa_micros = 1_000_000
9497
end
98+
9599
# Sets the App Campaign Settings.
96100
c.app_campaign_setting = client.resource.app_campaign_setting do |acs|
97101
acs.app_id = 'com.google.android.apps.adwords'
98102
acs.app_store = :GOOGLE_APP_STORE
99103
# Optimize this campaign for getting new users for your app.
100104
acs.bidding_strategy_goal_type = :OPTIMIZE_INSTALLS_TARGET_INSTALL_COST
101105
end
106+
107+
# Declare whether or not this campaign serves political ads targeting the EU.
108+
# Valid values are CONTAINS_EU_POLITICAL_ADVERTISING and
109+
# DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING.
110+
c.contains_eu_political_advertising = :DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
111+
102112
# Optional fields
103113
c.start_date = DateTime.parse((Date.today + 1).to_s).strftime('%Y%m%d')
104114
c.end_date = DateTime.parse(Date.today.next_year.to_s).strftime('%Y%m%d')

examples/advanced_operations/add_dynamic_search_ads.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ def create_campaign(client, customer_id, budget_resource_name)
7777
s.language_code = "en"
7878
end
7979

80+
# Declare whether or not this campaign serves political ads targeting the EU.
81+
# Valid values are CONTAINS_EU_POLITICAL_ADVERTISING and
82+
# DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING.
83+
c.contains_eu_political_advertising = :DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
84+
8085
c.start_date = DateTime.parse((Date.today + 1).to_s).strftime('%Y%m%d')
8186
c.end_date = DateTime.parse(Date.today.next_year.to_s).strftime('%Y%m%d')
8287
end

examples/advanced_operations/add_performance_max_campaign.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ def create_performance_max_campaign_operation(
211211
# Set the budget using the given budget resource name.
212212
c.campaign_budget = client.path.campaign_budget(customer_id, BUDGET_TEMPORARY_ID)
213213

214+
# Declare whether or not this campaign serves political ads targeting the EU.
215+
# Valid values are CONTAINS_EU_POLITICAL_ADVERTISING and
216+
# DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING.
217+
c.contains_eu_political_advertising = :DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
218+
214219
# Optional fields
215220
c.start_date = DateTime.parse((Date.today + 1).to_s).strftime('%Y%m%d')
216221
c.end_date = DateTime.parse(Date.today.next_year.to_s).strftime('%Y%m%d')

examples/advanced_operations/add_smart_campaign.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,10 @@ def create_smart_campaign_operation(
408408
# Assigns the resource name with a temporary ID.
409409
c.resource_name = client.path.campaign(customer_id, SMART_CAMPAIGN_TEMPORARY_ID)
410410
c.campaign_budget = client.path.campaign_budget(customer_id, BUDGET_TEMPORARY_ID)
411+
# Declare whether or not this campaign serves political ads targeting the EU.
412+
# Valid values are CONTAINS_EU_POLITICAL_ADVERTISING and
413+
# DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING.
414+
c.contains_eu_political_advertising = :DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
411415
end
412416
end
413417

examples/advanced_operations/use_portfolio_bidding_strategy.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def use_portfolio_bidding_strategy(customer_id)
8181
ns.target_search_network = true
8282
ns.target_content_network = false
8383
ns.target_partner_search_network = false
84+
c.contains_eu_political_advertising = :DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
8485
end
8586
end
8687
end

examples/basic_operations/add_campaigns.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ def add_campaigns(customer_id)
6868
ns.target_partner_search_network = false
6969
end
7070

71+
# Declare whether or not this campaign serves political ads targeting the EU.
72+
# Valid values are CONTAINS_EU_POLITICAL_ADVERTISING and
73+
# DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING.
74+
c.contains_eu_political_advertising = :DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
75+
7176
# Optional: Set the start date.
7277
c.start_date = DateTime.parse((Date.today + 1).to_s).strftime('%Y%m%d')
7378

examples/basic_operations/update_campaign.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def update_campaign(customer_id, campaign_id)
2525
# ENV['HOME']/google_ads_config.rb when called without parameters
2626
client = Google::Ads::GoogleAds::GoogleAdsClient.new
2727

28-
2928
resource_name = client.path.campaign(customer_id, campaign_id)
3029

3130
operation = client.operation.update_resource.campaign(resource_name) do |c|

examples/campaign_management/add_complete_campaigns_using_batch_job.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ def build_campaign_operations(client, customer_id, campaign_budget_resource_name
230230
# Sets the bidding strategy and budget.
231231
c.manual_cpc = client.resource.manual_cpc
232232
c.campaign_budget = campaign_budget_resource_name
233+
# Declare whether or not this campaign serves political ads targeting the EU.
234+
# Valid values are CONTAINS_EU_POLITICAL_ADVERTISING and
235+
# DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING.
236+
c.contains_eu_political_advertising = :DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
233237
end
234238
end
235239

examples/factories/various_factories_usage.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ def add_campaigns(customer_id)
6161
ns.target_partner_search_network = false
6262
end
6363

64+
# Declare whether or not this campaign serves political ads targeting the EU.
65+
# Valid values are CONTAINS_EU_POLITICAL_ADVERTISING and
66+
# DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING.
67+
campaign.contains_eu_political_advertising = :DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING
68+
6469
# Alternate non-block style, where we pass the campaign object we built
6570
# up
6671
campaign_operation = client.operation.create_resource.campaign(campaign)

0 commit comments

Comments
 (0)