CampaignConversionGoalOperation V18 Missing setCreate() Method

10 views
Skip to first unread message

dhrutish ramoliya

unread,
Feb 26, 2025, 4:06:50 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
Reply all
Reply to author
Forward
0 new messages