StringLengthError.TOO_LONG for userDataRule.ruleString

72 views
Skip to first unread message

Mark

unread,
Nov 4, 2019, 12:36:32 PM11/4/19
to AdWords API and Google Ads API Forum
Hello,

We have been encountering multiple cases where creating/updating user lists results in a StringLengthError.TOO_LONG error. I've been browsing through the documentation and haven't found any clues as to what the limit can be. I can see there is a limit of 1000 RuleItems per Rule, but we are nowhere near that limit. 

Thanks in advance,
Mark

Google Ads API Forum Advisor Prod

unread,
Nov 4, 2019, 1:53:56 PM11/4/19
to battlefie...@gmail.com, adwor...@googlegroups.com

Hi Mark,

 

Thank you for reaching out. Can you please provide the complete SOAP logs of you API request via reply privately to author so that I can investigate further?  I'm not sure which client library you're using, but here is a guide on how to enable logging in the Java client library.

Regards,
Mitchell
Google Ads API Team



ref:_00D1U1174p._5001UMWAzH:ref

Mark

unread,
Nov 6, 2019, 10:58:00 AM11/6/19
to AdWords API and Google Ads API Forum
Hey Mitchell,

Replying to your response here. Were you successfully able to create a user list with all 246 items? I have tried to use only the last 4 URLs, and a user list was created successfully. 
According to the documentation, a RuleItemGroup may contain up to 1000 entries. Are there any other limits we need to be aware of? We have another case where the creation fails for 236 items. 

We have also tried to circumvent the issue by using disjunctive RuleType, and adding a single RuleItem in each group (which would effectively be the same), but it fails with the same error for even less URLs.

It would be important to know what the limit exactly is so that we could come up with an alternate solution eg. some kind of "paging" for user lists. 

Could you please look into it?

Thanks,
Mark

Google Ads API Forum Advisor Prod

unread,
Nov 11, 2019, 10:22:50 AM11/11/19
to battlefie...@gmail.com, adwor...@googlegroups.com
Hi Mark,

I'm still checking with the engineering team to validate my initial investigation here. Basically, there is a total length limit of rule string combined by all the RuleItems, even though your list does not reach 1000 RuleItems. For example, if I have 2 RuleItems with "url__ CONTAINS example1.com" and "url__ CONTAINS example2.com", the total length of the rule string is roughly 28*2=56 characters long. Unfortunately, this is a hard limit and cannot be changed. You may want to shorten your RuleItem list to work around this limit. I will reply on this thread once again when I have validated this limit with the engineering team.


Thanks,
Poki, AdWords API Team

ref:_00D1U1174p._5001UMWAzH:ref

Google Ads API Forum Advisor Prod

unread,
Nov 12, 2019, 8:06:31 AM11/12/19
to battlefie...@gmail.com, adwor...@googlegroups.com
Hi Mark,

I have validated with the engineering team and my initial investigation is correct. You will have to reduce your total number of RuleItems in order to get around this limit.
Reply all
Reply to author
Forward
0 new messages