How update campaign's targeting setting?

77 views
Skip to first unread message

Shunya Inoue

unread,
Aug 1, 2022, 9:37:19 PM8/1/22
to Google Ads API and AdWords API Forum
Hi team,

Is it possible to update targeting(placement/exclusions) for a campaign/ad group using the Google Ads API?

Manually it is possible to do so by following these steps
1. update the list of shared libraries
2. set the list to your campaign

"https://developers.google.com/google-ads/api/reference/rpc/v11/MutateSharedSetsRequest" is probably the API to update the shared library, but all I can do is rename the list of shared libraries.

Also, is "https://developers.google.com/google-ads/api/reference/rpc/v11/MutateCampaignSharedSetsRequest" the API for setting a list of shared libraries to a campaign?

Regards,

Google Ads API Forum Advisor

unread,
Aug 2, 2022, 1:48:36 AM8/2/22
to shunya...@m0mentum.co.jp, adwor...@googlegroups.com
Hi Shunya,

Thank you for reaching out to us.

Moving forward to your question, “Is it possible to update targeting(placement/exclusions) for a campaign/ad group using the Google Ads API?

-Yes, I could confirm that you may indeed use the https://developers.google.com/google-ads/api/reference/rpc/v11/MutateCampaignSharedSetsRequest for setting a list of shared libraries to a campaign.

And for this one, "https://developers.google.com/google-ads/api/reference/rpc/v11/MutateSharedSetsRequest", I could confirm that this is just to rename the list of shared libraries.

Let me know if you have further questions.

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2d3rMy:ref

Shunya Inoue

unread,
Aug 2, 2022, 2:08:23 AM8/2/22
to Google Ads API and AdWords API Forum
Does it mean that there is no way to update items in targeting lists (e.g., URLs where we don't want to display ads) using Google Ads API?

regards,

2022年8月2日火曜日 14:48:36 UTC+9 adsapi:

Google Ads API Forum Advisor

unread,
Aug 2, 2022, 4:51:13 AM8/2/22
to shunya...@m0mentum.co.jp, adwor...@googlegroups.com
Hi Shunya,

Thank you for the reply.

To answer your question, there is no direct way to update items in targeting lists. The workaround for here is to remove and just create again the placement with updated details using SharedCriterionOperation.

Let me know if you have additional questions.

Shunya Inoue

unread,
Aug 2, 2022, 11:02:21 PM8/2/22
to Google Ads API and AdWords API Forum
Hi,

Thank you for your answer.

What is `criterion_id`?
Does `criterion_id` refer to the ID of each item (e.g. placement/exclusion URLs) in a specific targeting list?

regards,

2022年8月2日火曜日 17:51:13 UTC+9 adsapi:

Google Ads API Forum Advisor

unread,
Aug 3, 2022, 1:31:59 AM8/3/22
to shunya...@m0mentum.co.jp, adwor...@googlegroups.com
Hi Shunya,

Thank you for getting back to us. I am Sherwin from Google Ads API and I work with Heidi. i hope that you are doing well today.

The criterion_id is a unique and persistent assigned ID. You may refer to this document as this page contains tables of criterion IDs and system codes and formats (for example: currencies, dates, locales).

If you have further concerns, please let us know.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


ref:_00D1U1174p._5004Q2d3rMy:ref

Shunya Inoue

unread,
Aug 3, 2022, 3:47:06 AM8/3/22
to Google Ads API and AdWords API Forum
Hi Sherwin, Heidi,

I actually used SharedCriterionService to make it work(several items(URL) of a targeting list had changed).
It is good for me, but I have a question.
MutateSharedCriteriaResponse returns criterion_id if MutateSharedCriteriaRequest succeeds, but it seems that the criterion_id does not match any codes and formats.
I'm afraid I don't know why.


> Does `criterion_id` refer to the ID of each item (e.g. placement/exclusion URLs) in a specific targeting list?
Does it means that shared sets/targeting lists/items of targeting lists do NOT have unique `criterion_id`?
If so, what is returned criterion_id by MutateSharedCriteriaResponse?

regards,
Shunya

2022年8月3日水曜日 14:31:59 UTC+9 adsapi:

Google Ads API Forum Advisor

unread,
Aug 3, 2022, 7:11:26 AM8/3/22
to shunya...@m0mentum.co.jp, adwor...@googlegroups.com
Hi Shunya,

Thank you for clarifying your concern. I am also a member of the Google Ads API team and let me provide support to your concern.

Please see my answer below for each question:
"Does `criterion_id` refer to the ID of each item (e.g. placement/exclusion URLs) in a specific targeting list? ... If so, what is returned criterion_id by MutateSharedCriteriaResponse?"
-To answer these questions, I can confirm that the criterion_id will return the ID of each item in a specific targeting list.


Does it means that shared sets/targeting lists/items of targeting lists do NOT have unique `criterion_id`?
-The said entities have IDs, but the uniqueness of the entities can be determined according to this document.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2d3rMy:ref
Reply all
Reply to author
Forward
0 new messages