AdWords
5.4K members online now
5.4K members online now
Get started with AdWords - learn the basics to get set up for success
Guide Me
star_border
Reply

adwords script method - not working for maxCpc

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

adwords script - keyword.getMaxCpc() method is not working returning null value ...kindly help...

1 Expert replyverified_user

Re: adwords script method - not working for maxCpc

Top Contributor Alumni
# 2
Top Contributor Alumni

Hi Pankaj,

Welcome to the AdWords Community!

 

Can you please copy and paste the Script you're using and post it here?

Here is a resource to more about Scripts along with sample Scripts for common tasks. You may be able to find what you're looking for. 

Marked as Best Answer.
Solution
Accepted by topic author Pankaj A
September 2015

Re: adwords script method - not working for maxCpc

Top Contributor
# 3
Top Contributor

Hi Pankaj, are any of these Keywords under a bidding strategy other than Manual CPC?  the getMaxCpc() method only works for Manual CPC, so if they're under a flexible strategy, either at the Campaign or Group level, it'll return NULL.

 

Jon

AdWords Top Contributor Google+ Profile | Partner Profile | AdWords Audits

Re: adwords script method - not working for maxCpc

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Hello Jon, Thanx for your quick reply . It was due to Flexible strategy. One more query to ask. How i can get the current avg. position is there any method for script and also how frequently the avg. position gets changed as per bid so that we can know the current position.

Re: adwords script method - not working for maxCpc

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Hello Vkore, thanx for your useful resource. I found in it how to run script.

Re: adwords script method - not working for maxCpc

Top Contributor
# 6
Top Contributor

Hi Pankaj, to view average position you'll either need to use getStatsFor on the object you're currently using for .getMaxCpc(), or use an API Report.  GetStatsFor is relatively easy to use and an example is shown here:  

 

https://developers.google.com/adwords/scripts/docs/reference/adwordsapp/adwordsapp_stats

 

This is actually shown working on a campaign object but it works the same way for keywords.  Once you have a stats object, you can then use getAveragePosition().

 

I don't know how frequently these stats are updated, but nothing in AdWords is real-time so there's almost certainly some delay.  In my scripts I never use anything more recent than "YESTERDAY" (unless stats aren't relevant) and I'd recommend a similar approach.  It also depends upon how many impressions you're getting.  If you're getting 10000 a day and you're looking at a 30 day period, any time delay for today is unlikely to change the average reported position for that period.  If you only get 10 a day and are only looking at 3 days of data, recent impressions could be more relevant.

 

Jon

AdWords Top Contributor Google+ Profile | Partner Profile | AdWords Audits

Re: adwords script method - not working for maxCpc

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Hi jon,

Thanks again. Surely I will look for the things you have mentioned and try to organize my code accordingly by using getStatsFor(). Smiley Happy....and try to get the stats for avg. position.
Thanks for your help