Exclude Product on the basis of ItemId/OfferId in shopping campaign using c#

34 views
Skip to first unread message

For Study

unread,
Sep 23, 2019, 12:37:42 AM9/23/19
to AdWords API and Google Ads API Forum

I have added Google Ad Words Library as reference
using SHOPPING_PERFORMANCE_REPORT, I have generated this report in windows application (Please find attachment).
this report showing this month statistics.
I want to exclude the product from this campaign only (product may be repeated in other campaign), by Google Adwords API using c#.
Please help, How to remove/exclude the product by code, Which service/class/API method is used or What is logic behind the exclude of product...

Thanks & Regards
shopping-product.png

Google Ads API Forum Advisor Prod

unread,
Sep 23, 2019, 12:56:00 AM9/23/19
to adwor...@googlegroups.com
Hi,

My apologies as our team cannot provide the specific example you are looking for. You can refer to this example code (also available in other languages) on how you can target or exclude campaign criteria. However, please note that it is currently not possible to exclude a ProductScope or a ProductPartition criterion at the campaign level. You can refer to our criteria usage guide as to which levels targeting and excluding criteria are supported.

That being said, I would recommend that you instead use the AdGroupCriterionService to create your ProductPartition (ProductOfferId) and associate your ProductPartition criterion to a NegativeAdGroupCriterion object. To learn more about partitioning, you may refer to this section of our shopping campaigns guide.

Thanks and regards,
Peter
Google Ads API Team

ref:_00D1U1174p._5001UHHRHn:ref

For Study

unread,
Sep 27, 2019, 1:31:31 AM9/27/19
to AdWords API and Google Ads API Forum
Can you give me sample code in c# how to apply negative criterion and how to pass the ProductOfferId to exclude the product from campaign.


Please help.

Google Ads API Forum Advisor Prod

unread,
Sep 27, 2019, 2:28:29 AM9/27/19
to adwor...@googlegroups.com
Hi,

It appears that my response from the original forum thread was deleted. However, you may refer below for my response if you were not able to view it :


"My apologies as our team cannot provide the specific example you are looking for. You can refer to this example code (also available in other languages) on how you can target or exclude campaign criteria. However, please note that it is currently not possible to exclude a ProductScope or a ProductPartition criterion at the campaign level. You can refer to our criteria usage guide as to which levels targeting and excluding criteria are supported.

That being said, I would recommend that you instead use the AdGroupCriterionService to create your ProductPartition (ProductOfferId) and associate your ProductPartition criterion to a NegativeAdGroupCriterion object. To learn more about partitioning, you may refer to this section of our shopping campaigns guide.
"

Moving forward, my apologies once more as we currently do not have a specific example for what you are looking for. You can, however, refer to the AddKeywords example as it provides reference code on how to create an ad group criterion. For your scenario you can use the NegativeAdGroupCriterion instead and associate your ProductPartition to it in order to have the partition excluded.

Thanks and regads,

Peter
Google Ads API Team

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