Restricts this selector to only select desktop targets.
Sets a custom date range onto the selector.
Sets a custom date range onto the selector. Both parameters can be either an object containing year, month, and day fields, or an 8-digit string in
YYYYMMDD
form. For instance,
March 24th, 2013
is represented as either
{year: 2013, month: 3, day: 24}
or
"20130324"
. The date range is inclusive on both ends, so
forDateRange("20130324", "20130324")
sets the range of one day.
Date range must be specified if the selector has conditions or ordering for a stat field. Note that only the last date range specified for the selector will take effect.
Fetches the requested platforms and returns an iterator.
Returns stats for the specified custom date range.
Returns stats for the specified custom date range. Both parameters can be either an object containing year, month, and day fields, or an 8-digit string in
YYYYMMDD
form. For instance,
March 24th, 2013
is represented as either
{year: 2013, month: 3, day: 24}
or
"20130324"
. The date range is inclusive on both ends, so
forDateRange("20130324", "20130324")
defines a range of a single day.
Restricts this selector to only select mobile targets.
Specifies the ordering of the resulting entities.
Specifies the ordering of the resulting entities.
orderBy
parameter can have one of the following forms:
orderBy("Cost")
- orders results by Cost, in ascending order.orderBy("Ctr ASC")
- orders results by Ctr, in ascending order.orderBy("MaxCpc DESC")
- orders results by MaxCpc, in descending order.See withCondition(String) for enumeration of columns that can be used.
orderBy()
may be called multiple times. Consider the following example:
selector = selector.forDateRange("LAST_14_DAYS") .orderBy("Clicks DESC") .orderBy("CTR ASC");
The results will be ordered by Clicks in descending order. Results with equal Clicks value will be ordered by Ctr in ascending order.
If a stats column is used in the ordering, date range must be specified via forDateRange(String) or forDateRange(Object, Object).
LabelNames
column cannot be used for ordering.
Restricts this selector to only select tablet targets.
Restricts this selector to return only platforms with the given platform IDs.
Restricts this selector to return only platforms with the given platform IDs.
All platforms are uniquely identified by the combination of their campaign ID and platform ID. The IDs for this selector are thus represented as two-element arrays, with the first element being the campaign ID and the second being the platform ID:
var platformIds = [ [12345, 987987], [23456, 876876], [34567, 765765], ]; selector = selector.withIds(platformIds);
In cases where the campaign ID is already known, the IDs for this selector can then be just an array of platform IDs. Any provided campaign ID and platform ID combination will override the embedded campaign ID. For instance, the following will select the platforms with the given platform IDs in the given campaign:
var ids = [12345, 23456, 34567]; var platforms = campaign.targeting().platforms().withIds(ids);
The resulting selector can be further refined by applying additional conditions to it. The ID-based condition will then be AND-ed together with all the other conditions, including any other ID-based conditions. So, for instance, the following selector:
var ids1 = [ [12345, 987987], [23456, 876876], [34567, 765765], ]; var ids2 = [ [34567, 765765], [45678, 654654], [56789, 543543], ]; AdWordsApp.platforms() .withIds(ids1) .withIds(ids2);will only get the platform with ID
[34567, 765765]
, since it would be the only platform that satisfies both ID conditions.Specifies limit for the selector to use.
Specifies limit for the selector to use. For instance,
withLimit(50)
returns only the first 50 entities.
Fetches platforms. Supports filtering and sorting.
Typical usage: