Script Migration & Keyword Bidding: mapping of keyword column MaxCPC (Cost per Click)

213 views
Skip to first unread message

PPc management

unread,
Mar 3, 2022, 7:20:58 PM3/3/22
to Google Ads Scripts Forum
Hi guys,

it seems that some keyword columns are not available in the Google ads Beta script.
In Ads script: we have MaxCpc (for example withCondition("MaxCpc > 0.50"). The value is in the account currency).
From  Ads Script Beta : No way to get the Max CPC set via the Google ads UI on each keyword.

Any ideas? or a workaround?
Our goal is to filter the keywords based on their defined Max CPC. This will help us to assign a new value only on keywords that need to be updated, which will save script time and allow for a more best practice approach.

I started to think that there were some missing elements in the documentation and found that MaxCpc is more like a metric column, but we can't find it in the Ads Script Beta documentation as well.
On the other hand, in the Google ads API documentation, we found this syntax for other entities:
cpcBidMicros as The CPC (cost per click) bid. link
recommended_cpc_bid_micros as . link

So is there a correct syntax for this ? 
const keywords = AdsApp.keywords()
                .withCondition('campaign.id = ' + id)
                .withCondition('ad_group.status = ENABLED')
                .withCondition('metrics.cpcBidMicros > ' + MY_NEW_CPC_VALUE)
                .get();

Best,

PPc management

unread,
Mar 7, 2022, 10:56:13 AM3/7/22
to Google Ads Scripts Forum
Hi, Finally found how to return Keywords filtered by keyword bidding MaxCpc values. 
Seems Bidding relate on ad_group :

const keywords = AdsApp.keywords()
                .withCondition('ad_group_criterion.cpc_bid_micros > 800000') //bid 0,8
                .get();

Best,

Google Ads Scripts Forum Advisor

unread,
Mar 8, 2022, 4:25:54 AM3/8/22
to adwords...@googlegroups.com

Hello,

Thank you for contacting us. I appreciate your patience on this. I’m James, allow me to assist you further.

I confirm that the equivalent of the MaxCpc column within Keywords entity to Google Ads Scripts Beta is ad_group_criterion.cpc_bid_micros. Take note that the Google Ads Script Beta is the preview of an upcoming version of scripts that has a completely rewritten backend to take advantage of new features in the Google Ads API.

Let me know if you need further assistance.

Regards,

Google Logo
James Howell
Google Ads Scripts Team
 


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