How to assign conversion actions to a campaign

58 views
Skip to first unread message

Marlon Gómez

unread,
Dec 19, 2024, 9:28:16 AM12/19/24
to Google Ads API and AdWords API Forum
Hi, I am retrieving the conversion actions of a customer to use them in the creation of my campaign. But I can't find any documentation on how or where to use the resourceName of the conversion action when creating the campaign.

Currently I tried with the selectiveOptimization value in the campaign resource because it was the closest I found in the documentation, but it returns the following error:

Request:
{
      name: 'test generate google - Buzzly',
      status: 'ENABLED',
      campaignBudget: 'customers/9437372372/campaignBudgets/14185471816',
      manualCpc: { enhancedCpcEnabled: false },
      advertisingChannelType: 'SEARCH',
      networkSettings: {
        targetContentNetwork: true,
        targetGoogleSearch: true,
        targetSearchNetwork: false,
        targetPartnerSearchNetwork: false
      },
      selectiveOptimization: {
        conversionActions: [ 'customers/9437372372/conversionActions/6885521223' ]
      }
}

Error:
{
  "errorCode": { "requestError": "UNKNOWN" },
  "message": "The error code is not in this version.",
  "trigger": { "stringValue": "[6885521223]" },
  "location": {
    "fieldPathElements": [
      { "fieldName": "operations", "index": 0 },
      { "fieldName": "create" },
      { "fieldName": "selective_optimization" },
      { "fieldName": "conversion_actions" }
    ]
  }
}

RequestID:
T8sVIAECgJ46Ux8OyPa0Jw

I would appreciate guidance on how to assign conversion actions to a campaign.

Google Ads API Forum Advisor

unread,
Dec 19, 2024, 3:40:07 PM12/19/24
to marlo...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

Please note that selective_optimization feature applies only to app campaigns that use MULTI_CHANNEL as AdvertisingChannelType and APP_CAMPAIGN or APP_CAMPAIGN_FOR_ENGAGEMENT as AdvertisingChannelSubType. So, selective_optimization does not support SEARCH AdvertisingChannelType.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vGply:ref" (ADR-00279288)

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5


 


Marlon Gómez

unread,
Dec 19, 2024, 3:57:35 PM12/19/24
to ads...@forumsupport.google, adwor...@googlegroups.com

Hi, I understand, but then how can I apply conversion actions to other types of campaigns?

As I understood reading a little bit about it, you select by default the conversion events of the account? Could you clarify this issue a bit?

Marlon Gómez

unread,
Dec 19, 2024, 6:27:33 PM12/19/24
to Google Ads API and AdWords API Forum
To expand on the above, when trying to create a search campaign from the manager UI, the default targets appear at the end.

When I create a campaign from the API, it is created by default with the conversion actions of the account. But the UI has the option to “Remove” and leave the ones you want. How can I replicate this behavior from the API and campaign creation?

Screenshot 2024-12-19 182531.png

Google Ads API Forum Advisor

unread,
Dec 19, 2024, 9:29:32 PM12/19/24
to marlo...@gmail.com, adwor...@googlegroups.com
Hi,

This feature is not supported for search campaigns. As informed in the earlier email, the selective optimization, this setting appears to be currently only possible to be used by app campaigns

If you feel you need to set conversion goals for search campaigns, then there is another option. There is a concept called Conversion Goals where you can set custom goals for your campaign. 

I hope this helps! Let us know if you have any further questions. 
Reply all
Reply to author
Forward
0 new messages