I got this Fatal Error/Uncaught Error while linking with the Google Ads API. I've used the Github code and downloaded library from composer

Fatal error: Uncaught Error: Class "Google\Ads\GoogleAds\Examples\Utils\ArgumentParser" not found in googleAdword\examples\BasicOperations\GetCampaigns.php:44 Stack trace: #0 googleAdword\examples\BasicOperations\GetCampaigns.php(120): Google\Ads\GoogleAds\Examples\BasicOperations\GetCampaigns::main() #1

Tried all these solutions:

  1. reinstalling the lib, and not through zip downloading at first, but through git clone, and then install through composer etc.
  2. In the sample code of GetAccountInformation, there is a CUSTOMER_ID field that is required before you execute the code.(Already set)

I need to import pandas and google ads in the AWS lambda function. pandas support only the 3.7 version and google ads support only the 3.8 version.

When I've given lambda 3.8 version google ads works and pandas get an error and when I'm given lambda 3.7 version pandas works and google ads get an error.

Please guide me on how to support the two versions of layers.

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:

customers/[CUSTOMER_ID]/conversionActions/[CONVERSION_ACTION_ID_0] customers/[CUSTOMER_ID]/conversionActions/[CONVERSION_ACTION_ID_1] 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:

$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]'     ]   ]) ); 

It gives me this error:

{     "message": {         "message": "Request contains an invalid argument.",         "code": 3,         "status": "INVALID_ARGUMENT",         "details": [             {                 "@type": "type.googleapis.com/google.ads.googleads.v10.errors.GoogleAdsFailure",                 "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"             }         ]     }, } 

Can you tell me what I am doing wrong? Or suggest any help?.

Thanks.

I want to get the report as shown here https://prnt.sc/oG7ms7tOdVfH

The input is Country = USA Date from and Date to

But this gives non US states and it doesnt summarize the resuly by state names (not the state IDs)

Can anyone help me to get the REST API?

  curl "https://googleads.googleapis.com/v10/customers/${CUSTOMER_ID}/googleAds:searchStream" \    --header "Content-Type: application/json" \ --header "developer-token: ${DEVELOPER_TOKEN}" \    --header "login-customer-id: ${MANAGER_CUSTOMER_ID}" \    --header "Authorization: Bearer ${OAUTH2_ACCESS_TOKEN}" \    --data '{ "query": "       SELECT         PERFORMANCE COST       FROM LOCATION       WHERE COUNTRY = 'USA' AND           segments.date BETWEEN 20220101 AND 20220430      " }'