CampaignConversionGoalOperation V18 Missing setCreate() Method

19 views
Skip to first unread message

dhrutish ramoliya

unread,
Feb 26, 2025, 4:11:54 AM2/26/25
to Google Ads API and AdWords API Forum
  • Clearly state the issue: "The CampaignConversionGoalOperation class in version V18 of the google-ads-php library is missing the setCreate() method, which is expected for creating campaign conversion goals. This contradicts the general understanding and expected behaviour based on other Google Ads API services."

  • I'm also attaching a file "CampaignConversionGoalOperation.php" V18.

  • Relevant Information:

  • Library version: google-ads-php-lib V18
  • PHP version: 8.3
  • Laravel version 10.23
 
  • Provide the relevant code snippet:
    $conversionGoal = new CampaignConversionGoal([
    'campaign' => $campaignResourceName,
    'category' => $categoryValue,
    'origin' => $originValue,
    'biddable' => false,
    ]);
    $operation = new CampaignConversionGoalOperation();
    $operation->setCreate($conversionGoal);
    $mutateRequest = new MutateCampaignConversionGoalsRequest([
    'customer_id' => $customerId,
    'operations' => $operations,
    ]);

    $campaignConversionGoalServiceClient = $googleAdsClient->getCampaignConversionGoalServiceClient();
    $response = $campaignConversionGoalServiceClient->mutateCampaignConversionGoals($mutateRequest);

  • [2025-02-26 08:49:37] local.INFO: 🔍 Processing Conversion Goals: [{"category": "ENGAGEMENT", "origin": "GOOGLE_HOSTED", "biddable": false}] 

    [2025-02-26 08:49:37] local.ERROR: 🔴 Error creating conversion goal for ENGAGEMENT: Call to undefined method Google\Ads\GoogleAds\V18\Services\CampaignConversionGoalOperation::setCreate()  

    [2025-02-26 08:49:37] local.WARNING: ⚠️ No valid Conversion Goal operations were created for the campaign: customers/9529713466/campaigns/22286718458
CampaignConversionGoalOperation.php

Google Ads API Forum Advisor

unread,
Feb 26, 2025, 5:17:52 AM2/26/25
to dhrutish...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out to Google Ads API Support.

I understand you are getting an error in CampaignConversionGoalOperation. To assist you further, kindly provide us with complete API logs (request and response logs with request-id and request header) generated at your end

Since you are using the PHP client library, if you haven't enabled the logging yet, I would request you to enable it by referring to this guide on PHP.

Reply privately to the author option, or direct private reply to this email.

 
Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-02-26 10:17:15Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vH40Y:ref" (ADR-00289875)



Reply all
Reply to author
Forward
0 new messages