Optimizing Google Search Campaign by specific conversion Actions

83 views
Skip to first unread message

Malkhazi Dartsmelidze

unread,
Jun 13, 2022, 10:11:01 AM6/13/22
to Google Ads API and AdWords API Forum
Hello. I am using Google Ads PHP library to create Campaign.
I created almost any type of campaigns but didn't manage to optimize them by specific Conversion Actions.

For example: 
I have created 3 different Conversion Actions:
  1. customers/[CUSTOMER_ID]/conversionActions/[CONVERSION_ACTION_ID_0]
  2. customers/[CUSTOMER_ID]/conversionActions/[CONVERSION_ACTION_ID_1]
  3. customers/[CUSTOMER_ID]/conversionActions/[CONVERSION_ACTION_ID_2]
Then I created a Campaign: customers/[CUSTOMER_ID]/campaigns/[CAMPAIGN_ID]

I set bidding strategy to MAXIMIZE CONVERSIONS and then tried to set Conversion Actions to optimize to.
This is my code snippet:

Screenshot 2022-06-13 180621.png

$campaign->setMaximizeConversions(
  new CommonMaximizeConversions([
    'target_cpa' => $this->convert()->micros(1)
  ])
);

$campaign->setSelectiveOptimization(
  new SelectiveOptimization([
    'conversion_actions' => [
      'customers/[CUSTOMER_ID]/conversionActions/[CONVERSION_ACTION_ID_0]',
      'customers/[CUSTOMER_ID]/conversionActions/[CONVERSION_ACTION_ID_1]'
    ]
  ])
);

Thank you.

Malkhazi Dartsmelidze

unread,
Jun 13, 2022, 10:14:14 AM6/13/22
to Google Ads API and AdWords API Forum
It gives me following error:

{
    "message": {
        "message": "Request contains an invalid argument.",
        "code": 3,
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "errors": [
                    {
                        "errorCode": {
                            "requestError": "UNKNOWN"
                        },
                        "message": "The error code is not in this version.",
                        "trigger": {
                            "stringValue": ""
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "selective_optimization"
                                },
                                {
                                    "fieldName": "conversion_actions"
                                }
                            ]
                        }
                    }
                ],
                "requestId": "xbgMUFFeP4447GFW_nJrIA"
            }
        ]
    },
}

Google Ads API Forum Advisor

unread,
Jun 13, 2022, 1:01:33 PM6/13/22
to malkhazida...@gmail.com, adwor...@googlegroups.com
Hi Malkhazi,

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

To investigate the issue further, could you please provide the complete request and response logs, with the request-id? If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.You can provide it via Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead. Let me know if you have any questions.

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


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