Need help on CRUD operations on Search Campaigns using Google Adwords API

67 views
Skip to first unread message

gagan gupta

unread,
Jun 9, 2020, 8:43:30 AM6/9/20
to AdWords API and Google Ads API Forum
Hello Google Team,

May you please help me with the code workflow and documentation for creating the Search Campaigns, assign Keywords, assign AdGroups, Assign all related Ads etc.

I searched these documents already, but they are not helping me with exact code.

above link mention generic code, not specific to search campaign.

above link does not have Seach campaign mentioned, however the Shopping and Smart shopping examples are mentioned.

3. I need Search Campaign code mentioned as similar 

Attached screenshots.

Regards,
Gagan 

Screenshot from 2020-06-09 18-00-04.png

Google Ads API Forum Advisor Prod

unread,
Jun 9, 2020, 2:17:17 PM6/9/20
to gagan...@gmail.com, adwor...@googlegroups.com
Hi,

The first example you mentioned shows how to implement search campaigns. You will see the line     campaign.setAdvertisingChannelType(AdvertisingChannelType.SEARCH) which sets the campaign type to SEARCH. You can find all the fields related to campaigns here.

Regards,
Anthony
Google Ads API Team 

ref:_00D1U1174p._5004Q20XOT0:ref

gagan

unread,
Jun 9, 2020, 2:54:29 PM6/9/20
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com
Would I be able to retrieve all information among these fields as well for an already created campaign? This will help me see how google back end would expect me to send data.
Is there any field need to be mentioned in different way ?

Gagan 

Google Ads API Forum Advisor Prod

unread,
Jun 9, 2020, 3:36:21 PM6/9/20
to gagan...@gmail.com, adwor...@googlegroups.com
Hi Gagan,

You can use the GetCampaigns example and include any of the fields you want returned in your selector.

Cheers,

gagan gupta

unread,
Jun 10, 2020, 5:27:50 AM6/10/20
to AdWords API and Google Ads API Forum
1. Unable to GET and POST :
Goal
Languages 
Locations.

Attached Snapshots.

2. Also, getting an error: INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE
Using Code as :
BiddingStrategyConfiguration biddingStrategyConfiguration = new BiddingStrategyConfiguration();
biddingStrategyConfiguration.setBiddingStrategyType(BiddingStrategyType.MAXIMIZE_CONVERSION_VALUE);
campaign.setBiddingStrategyConfiguration(biddingStrategyConfiguration);

I checked by doing GET on Successfully Created Campaigns using Adwords UI and found this value:
BiddingStrategyConfiguration{biddingStrategyType=MAXIMIZE_CONVERSION_VALUE}
which is exactly same as I am coding.

This error does not occur by using other strategies MAXIMIZE_CONVERSIONS, TARGET_ROAS, TARGET_CPA although all have similiar structure.


Gagan
locations.jpg
goal.jpg
AnonymousBidding.png

Google Ads API Forum Advisor Prod

unread,
Jun 10, 2020, 11:12:21 AM6/10/20
to gagan...@gmail.com, adwor...@googlegroups.com
Hi Gagan,
  1. These are criteria so you will need to use the CampaignCriterionService to pull its data. You can find an example on how to use it here.
  2. Please reply privately to author your full SOAP logs that resulted in this error
Regards,

gagan gupta

unread,
Jun 11, 2020, 2:40:07 AM6/11/20
to AdWords API and Google Ads API Forum
Hi Anthony.

1. Thanks, Got the Languages and Locations but didn't get the GOAL, please refer to goal.jpg and campaignCriteriaService logs.

2. Attached is INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE_Logs.

Sent you privately.

Regards,
Gagan 

gagan gupta

unread,
Jun 11, 2020, 2:43:37 AM6/11/20
to AdWords API and Google Ads API Forum
Also, Atached is the code I am using.
CampaignFields

gagan gupta

unread,
Jun 14, 2020, 7:49:50 AM6/14/20
to AdWords API and Google Ads API Forum
Any Analysis on the same?

Google Ads API Forum Advisor Prod

unread,
Jun 15, 2020, 9:02:10 AM6/15/20
to gagan...@gmail.com, adwor...@googlegroups.com
Hi Gagan,

I replied to you privately with the following:
Goals are not available in the API. For your INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE error, I will need the logs that come in this format.

gagan gupta

unread,
Jun 15, 2020, 9:38:21 AM6/15/20
to AdWords API and Google Ads API Forum
Thanks for the reply, I appreciate your support.
How shall I send you logs, please give me an email ID, because you are unable to receive private messages and I am also not able to receive your private messages?

Gagan

Google Ads API Forum Advisor Prod

unread,
Jun 15, 2020, 2:03:28 PM6/15/20
to gagan...@gmail.com, adwor...@googlegroups.com
Hi Gagan,

You can contact us at googleadsa...@google.com.

gagan gupta

unread,
Jun 16, 2020, 4:10:16 AM6/16/20
to AdWords API and Google Ads API Forum
Sent you, check gagan2020*@gmail.com

Google Ads API Forum Advisor Prod

unread,
Jun 16, 2020, 9:19:56 AM6/16/20
to gagan...@gmail.com, adwor...@googlegroups.com
Hi Gagan,

I received your email. I will follow up on there.

gagan gupta

unread,
Jun 18, 2020, 3:21:56 AM6/18/20
to AdWords API and Google Ads API Forum
Thanks, Anthony, 

I appreciate your focus and determination on the same.

Gagan 

gagan gupta

unread,
Jun 22, 2020, 6:01:56 AM6/22/20
to AdWords API and Google Ads API Forum
Hello, 

Any response, please.

Gagan
Reply all
Reply to author
Forward
0 new messages