Setting frequency_caps for a campaign

80 views
Skip to first unread message

Vinutha Nayak

unread,
May 22, 2019, 9:08:22 AM5/22/19
to AdWords API and Google Ads API Forum

Can anyone provide a sample to  set   frequency_caps[]  for a Campaign in Python ?

Since it's array value, I am not sure how it needs to be set ? Unfortunately neither do I find any example in the documentation.


Thanks and Regards,
Vinutha

Google Ads API Forum Advisor Prod

unread,
May 22, 2019, 11:35:41 PM5/22/19
to nayakv...@gmail.com, adwor...@googlegroups.com
Hello Vinutha,

I'm not as familiar with our Python client library, but I know someone who is. I'll put you in touch with him, so he can help you out with that.

Cheers,
Nadine Sundquist, Google Ads API Team

ref:_00D1U1174p._5001UAqKsP:ref

Vinutha Nayak

unread,
May 23, 2019, 1:27:32 AM5/23/19
to AdWords API and Google Ads API Forum
Thank you, that would be really  really heplful !!

Google Ads API Forum Advisor Prod

unread,
May 23, 2019, 10:13:30 AM5/23/19
to nayakv...@gmail.com, adwor...@googlegroups.com

Hi Vinuntha,

Thanks for reaching out with this question! For future reference, this is the perfect type of question to post on the Issues tracker of the Github Repository for the library. It's really helpful to other users who might have the same question :)

The frequency_caps field on a campaign is a repeated message field, which means it's a list of message objects, in this case FrequencyCapEntry object. The proto3 documentation here explains how those fields work and how to manipulate them.

What you'll want to do is call the .add() method on the field, which will insert a FrequencyCapEntry instance into the repeated field and return it back. From there you can set fields on the object directly. Here's an example of it being done in the update_keyword.py example.

Hope that helps!

Best,
Ben Karl, Google Ads API Team



ref:_00D1U1174p._5001UAqKsP:ref

Souvik Basu

unread,
Apr 7, 2022, 3:19:51 PM4/7/22
to Google Ads API and AdWords API Forum
Hi,

can anyone help me with the same question. I am still facing the same issue.

I am not able to add the  frequency_caps.

Your help is very much appreciated.

Regards
Souvik Basu

Souvik Basu

unread,
Apr 7, 2022, 3:28:50 PM4/7/22
to Google Ads API and AdWords API Forum
Can you please help me with a example.

That would be of great help.

Google Ads API Forum Advisor

unread,
Apr 7, 2022, 4:25:29 PM4/7/22
to sou...@twyzle.com, adwor...@googlegroups.com
Hi Souvik,

Which client library are you using? And what's the error that you're receiving? 

Thanks,
Ben, Google Ads API Team

ref:_00D1U1174p._5001UAqKsP:ref

Souvik Basu

unread,
Apr 7, 2022, 4:45:12 PM4/7/22
to Google Ads API Forum Advisor, adwor...@googlegroups.com
Hi, 
I am using Python v10 API SDK.

Actually I am not getting any error, I am not sure how to add frequency cap

Thanks for your quick response

Souvik basu

Google Ads API Forum Advisor

unread,
Apr 11, 2022, 11:26:37 AM4/11/22
to sou...@twyzle.com, adwor...@googlegroups.com

Hi Souvik,

No problem, since Campaign.frequency_caps is a non-scalar repeated field, you will need to initialize a FrequencyCapEntry message and append it, like you would a normal list in Python.

Our documentation actually has an example for this exact field.

Hope this helps! If you have any other specific questions about using the Python client library, please submit an issue to our GitHub Issues page.

Best,


Ben, Google Ads API Team
 



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