Setting Conversions to Campaigns - AdwordsAPI

112 views
Skip to first unread message

pradeep...@gmail.com

unread,
May 20, 2021, 4:36:21 PM5/20/21
to AdWords API and Google Ads API Forum
Hi,

I would like to connect conversions to a campaign. I am currently using Adwords API to achieve this.
I tried adding Conversions using selective optimization, But i am unable to add multiple conversions to campaign (https://developers.google.com/adwords/api/docs/reference/v201809/CampaignService.SelectiveOptimization.html)
Error i get : CampaignError.CAMPAIGN_CANNOT_SET_MORE_THAN_ONE_CONVERSION_TYPE_ID

I would like to know how to add multiple conversions to campaign. 

Thank You,
Pradeep Datla.


Google Ads API Forum Advisor Prod

unread,
May 21, 2021, 2:33:42 PM5/21/21
to pradeep...@gmail.com, adwor...@googlegroups.com
Hello,

Thanks for reaching out. Can you please provide us with the complete request and response logs for this issue?

Thanks,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2HCXjz:ref

pradeep...@gmail.com

unread,
May 24, 2021, 8:12:09 PM5/24/21
to AdWords API and Google Ads API Forum
I have attached details log file for further investigation. Please let me know what the issue is

What i am trying to do: I am trying to add multiple conversions to a campaign using Adwords API.

Code: C#
List<CampaignOperation> operations = new List<CampaignOperation>();

                using (GoogleService.CampaignService campaignService = (GoogleService.CampaignService)user.GetService(AdWordsService.v201809.CampaignService))
                {

                    Campaign campaign = new Campaign
                    {
                        id = Convert.ToInt64(IDHERE)
                    };

                SelectiveOptimization optimize = new SelectiveOptimization();
                optimize.conversionTypeIds = new long[] { 589653082L, 588617162L };
                ListOperations listOperation = new ListOperations();
                listOperation.operators = new ListOperationsListOperator[] { ListOperationsListOperator.PUT, ListOperationsListOperator.PUT };
                optimize.conversionTypeIdsOps = listOperation;
                campaign.selectiveOptimization = optimize;
   

                // Create the operation.
                CampaignOperation operation = new CampaignOperation
                {
                    @operator = Operator.SET,
                    operand = campaign
                };

                operations.Add(operation);
                CampaignReturnValue retVal = null;
                try
                {
                    // Add the campaign.
                    retVal = campaignService.mutate(operations.ToArray());
                }
                catch (Exception campaignEx)
                {
                    throw campaignEx;
                }

Thank You,
Pradeep Datla.

details.log

Google Ads API Forum Advisor Prod

unread,
May 25, 2021, 2:54:52 PM5/25/21
to pradeep...@gmail.com, adwor...@googlegroups.com
Hello,

Thanks for providing the complete logs. Not all campaign types can have multiple associated conversion actions. In particular, search campaigns only allow one conversion action (hence, " trigger:'SEARCH' ", in the logs). Please let us know if there is anything else that we can help with. 

Regards,

pradeep...@gmail.com

unread,
May 25, 2021, 2:59:20 PM5/25/21
to AdWords API and Google Ads API Forum

Hi Matt,

Can you please provide me info on the following
  1. Can you provide me with information on which type of campaigns support multiple Conversions
  2. In Google UI, I am able to add multiple conversions to "Search" Campaign by creating Conversion Set. So can I achieve the same thing in API . If so how can I do it?
Thank You,
Pradeep Datla.

Google Ads API Forum Advisor Prod

unread,
May 26, 2021, 4:36:55 AM5/26/21
to pradeep...@gmail.com, adwor...@googlegroups.com
Hi Pradeep, 

Thank you for your follow up questions. I work with Matt and allow me to assist you.


Can you provide me with information on which type of campaigns support multiple Conversions

Since this is more of a product related concern, I would recommend that you reach out instead to the Google Ads Product support team, via this link, for further guidance if multiple conversions is supported in the different campaign types.


In Google UI, I am able to add multiple conversions to "Search" Campaign by creating Conversion Set. So can I achieve the same thing in API . If so how can I do it?

This is currently not supported in the API. That said, allow me to create a feature request, subject for review. For now, you may keep an eye on our blog for updates or announcements.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


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