custom criteria filtering in report

1,002 views
Skip to first unread message

ambika...@unanimis.co.uk

unread,
Oct 24, 2013, 10:32:21 AM10/24/13
to google-doubleclick...@googlegroups.com

Hi,

We are currently using v201308 api version for downloading reports from dfp.

Is it possible to filter a report based on a custom criteria? (where custom_critera like  ‘cc%’) from the api? I can do this on the UI but from the api I get the following error:

 faultString: [PublisherQueryLanguageContextError.UNEXECUTABLE @ 'custom_criteria' is not a filterable field.]

 

Thanks

Nicholas Chen (DFP API Team)

unread,
Oct 25, 2013, 2:29:57 PM10/25/13
to google-doubleclick...@googlegroups.com
Hi Ambika,

If you're filtering on custom criteria - you'll need to fetch the relevant custom criteria keys first and then the relevant custom criteria values via the custom targeting service:


Once you have the relevant custom targeting value ids, if you include CUSTOM_CRITERIA as a dimension, you can filter on it by adding a statement e.g.

WHERE CUSTOM_TARGETING_VALUE_ID in (custom_targeting_value_ids)

Hope this helps!

Best,
Nicholas Chen, DFP API Team

ambika...@unanimis.co.uk

unread,
Oct 28, 2013, 4:41:41 AM10/28/13
to google-doubleclick...@googlegroups.com
Thanks Nicholas! That  works..

rene....@softgames.de

unread,
Jun 12, 2015, 2:13:15 AM6/12/15
to google-doubleclick...@googlegroups.com
Hello Nicholas,

I found this information yesterday and this is really bad for our purposes.

We want to get all custom criteria for two custom targeting key. In our case, this makes ca. 50k custom targeting value ids.
Creating a filter query with this amount of ids fails due to query length.
Working queries only include 1k ids. Which means we need to request 50 reports.
This fails either due to to much concurrent requests or due to quota exceeded.
We have a solution now by grouping and timing the report requests but this feels like bad practise.

Is there now other way or is it for you team possible to implement a better way.
e.g.
a) Filter for custom targeting key ids
b) Filter for custom criteria with a LIKE. This is how it works in the Frontend. How do you do it there?

Thanks a lot for a response.

Best,
René Simon

Nicholas Chen (DFP API Team)

unread,
Jun 12, 2015, 8:31:29 AM6/12/15
to google-doubleclick...@googlegroups.com, rene....@softgames.de
Hi Rene,

In the future, please make a new thread and simply reference the old thread - a lot can change in 2 years so seeing the old thread title might be misleading!

As far as filtering, both those requests are noted, but aren't likely to be done soon.

The first filter you're describing would more or less do the same thing as if you did an IN statement for the value ids. If it fails on the volume of value ids now - it's because 50,000 values is a ton of rows. For each value, you might have 10's if not 100's of line items (if not more) targeting each. Having something return millions of rows is process intensive - you'd probably run into another issue of reports timing out or simply failing in those cases.

The second filter you're asking for - I'm guessing also would fail to replicate the report when done from the UI (due to the volume of value IDs). There's a bit of client side magic being done in the FE, so it's not as simple as dropping that logic into our reportService.

So the tl;dr is - both those requests have come up before, but either wouldn't add much utility past making the code written look slightly cleaner with the API / simply wouldn't work.

Best,
Nicholas Chen, DFP API Team

Reply all
Reply to author
Forward
0 new messages