Creating a lineitem set to 'Run of network'

517 views
Skip to first unread message

lee

unread,
Aug 20, 2014, 1:42:26 AM8/20/14
to google-doubleclick...@googlegroups.com
In DoubleClick for Publishers UI interface, you can choose to include from the 'Ad units' node, which then adds "Run of network" to the Selected Criteria list.   How do I go about achieving this via the LineItemService?

Nicholas Chen (DFP API Team)

unread,
Aug 20, 2014, 4:19:56 PM8/20/14
to google-doubleclick...@googlegroups.com
Hi Lee,


Notice in this example we're targeting the line item to the root ad unit of the network, if you also say something like:

adUnitTargeting.setIncludeDescendants(true);

This will target as RON.

Best,
Nicholas Chen, DFP API Team

lee

unread,
Aug 20, 2014, 9:52:40 PM8/20/14
to google-doubleclick...@googlegroups.com
I was wondering if we don't add any AdUnitTargeting to lineitem.targeting.inventoryTargeting, would this default to RON?

Nicholas Chen (DFP API Team)

unread,
Aug 21, 2014, 10:05:26 AM8/21/14
to google-doubleclick...@googlegroups.com
Hi Lee,

You'll find you can't create a line item without inventory targeting :)

Best,
Nicholas Chen, DFP API Team

yi...@massarius.com

unread,
Mar 8, 2018, 6:23:35 AM3/8/18
to Google's DoubleClick for Publishers API Forum
Hi,

Sorry to dig up an old thread, but I was wondering the same thing.

I'm trying to do this in Python for a customer of ours; I want to use the API to target a line item on Run of Network.
I do not want to select an ad unit that inherits all children (for this customer I can not create ad units); I want to be able to literally Run of Network.

Is this possible with the API?

Thanks in advance,

Sander

Nicholas Figeac (DFP API Team)

unread,
Apr 24, 2018, 12:24:55 PM4/24/18
to Google's DoubleClick for Publishers API Forum
Hello Sander,

When targeting "Run of Network", that is referring to the root ad unit for the whole network. You can find this ad unit id using NetworkService.getCurrentNetwork where you can find field effectiveRootAdUnitId. Since, you don't want to select an ad unit's decendants, you will just need to set the field includeDescendants to false as this defaults to true.

Thanks,
Nicholas Figeac, DFP API Team

Julien Ricard

unread,
Jun 24, 2020, 11:06:52 AM6/24/20
to Google Ad Manager API Forum
It may confuse other readers: "you will just need to set the field includeDescendants to true as this defaults to false"
Reply all
Reply to author
Forward
0 new messages