V11 PHP Client Library - Updates to Campaign entities not taking

37 views
Skip to first unread message

Ryan Semple

unread,
Sep 23, 2022, 9:12:02 PM9/23/22
to Google Ads API and AdWords API Forum
Hi,

I'm trying to debug a process that involves setting campaign dates. Using the PHP Client library at this time 

$campaign = new Campaign([
'resource_name' => ResourceNames::forCampaign($customerId, $campaignId),
'end_date' => $campaignDates['endDate'] // value is set to 2022-10-31
]);

$campaignOperation = new CampaignOperation();
$campaignOperation->setUpdate($campaign);
$campaignOperation->setUpdateMask(FieldMasks::allSetFieldsOf($campaign));

$campaignServiceClient = $googleAdsClient->getCampaignServiceClient();
$response = $campaignServiceClient->mutateCampaigns(
$customerId,
[$campaignOperation]
);

When I run this it doesn't seem to report any issues, but the campaign in Google Ads proper isn't reflecting my changes - I found some code examples where the date is passed in as YYYYMMDD and that didn't seem to do it, either. 

Is there something else I should be trying? When I set budgets via an earlier step it seems okay.

Google Ads API Forum Advisor

unread,
Sep 26, 2022, 1:06:12 AM9/26/22
to charles...@frequence.com, adwor...@googlegroups.com
Hello Ryan,

This is Carmela from the Google Ads API team. Thank you for reaching out.

Moving forward, could you first provide the could you provide the complete request and response logs with request ID and request header generated on your end? If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (PHP) > 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, then send it instead on this email address googleadsa...@google.com.

Regards,
Google Logo
Carmela
Google Ads API Team
 


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