Adrotation mode setup in campaign level

67 views
Skip to first unread message

denma test

unread,
Aug 5, 2020, 1:57:41 AM8/5/20
to AdWords API and Google Ads API Forum
I am using Adwords API v201809 PHP library and i cannot find Adrotation mode option in campaign level, am done with AdGroup but in google ads there is ad rotation mode option available in UI but not in API. Please help me to get is solved.

Google Ads API Forum Advisor Prod

unread,
Aug 5, 2020, 11:21:11 AM8/5/20
to denm...@gmail.com, adwor...@googlegroups.com
Hello,

You can find this setting as the AdServingOptimizationStatus in the Campaign object.

Cheers,
Anthony
Google Ads API Team

ref:_00D1U1174p._5004Q23Higy:ref

denma test

unread,
Aug 6, 2020, 12:50:19 AM8/6/20
to AdWords API and Google Ads API Forum
Great, thanks for quick response.

denma test

unread,
Aug 11, 2020, 9:21:04 AM8/11/20
to AdWords API and Google Ads API Forum
Hi,
Am getting below error

Array ( [status] => error [message] => Campaign Ad Rotation has not updated [data] => Array ( [errorResponse] => [CampaignError.CANNOT_SET_AD_ROTATION_MODE @ operations[0].operand.adServingOptimizationStatus] [errorMsg] => CANNOT_SET_AD_ROTATION_MODE ) )

My code is
       $session = self::setSession();
        $adWordsServices = new AdWordsServices();
        $campaignService = $adWordsServices->get($session, CampaignService::class);
        $campaignId = intval($campaignId);
        $operations = [];
        // Create a campaign with PAUSED status.
        $campaign = new Campaign();
        $campaign->setId($campaignId);
        $campaign->setAdServingOptimizationStatus('ROTATE_INDEFINITELY');

        // Create a campaign operation and add it to the list.
        $operation = new CampaignOperation();
        $operation->setOperand($campaign);
        $operation->setOperator(Operator::SET);
        $operations[] = $operation;


        // Update the campaign on the server.
        $result = $campaignService->mutate($operations);

Kindly clarify me


On Wednesday, August 5, 2020 at 8:51:11 PM UTC+5:30, adsapiforumadvisor wrote:

Google Ads API Forum Advisor Prod

unread,
Aug 11, 2020, 9:58:18 AM8/11/20
to denm...@gmail.com, adwor...@googlegroups.com
Hello,

Unfortunately, it seems that setting the ad rotation at the campaign level. This setting is now deprecated via the API. You can find more details here.

Regards,

denma test

unread,
Aug 12, 2020, 12:53:44 AM8/12/20
to AdWords API and Google Ads API Forum
Hi
I see, thanks and is there any idea to add it in campaign level again.

Google Ads API Forum Advisor Prod

unread,
Aug 12, 2020, 9:43:37 AM8/12/20
to denm...@gmail.com, adwor...@googlegroups.com
Hi,

I cannot say whether or not this we get added again in the future. All announcements will be made on our blog.

denma test

unread,
Aug 13, 2020, 1:57:39 AM8/13/20
to AdWords API and Google Ads API Forum
Okay, thanks.
Reply all
Reply to author
Forward
0 new messages