Clears the set target ad group and campaign.
Clears the set target ad group and campaign. Does nothing if target ad group is not set.
Returns nothing.
Clears the set target campaign.
Clears the set target campaign. Does nothing if the target ad group is set.
Returns nothing.
Clears the set target keyword.
Clears the set target keyword.
Returns nothing.
Returns the value of the named attribute.
Returns the value of the named attribute. Returns
null
if the attribute does not have a value. Throws an error if the item's source has no attribute with the given name. The return will match the type of the attribute. An attribute of type
number
will return a number, an attribute of type
text
will return a string, and an attribute of type
date
will return a string in
YYYYMMDD HHMMSS
format.
Returns a map from attribute name to attribute value.
Returns a map from attribute name to attribute value. Attributes with no value are not included in the map. For instance, for an ad customizer item with attribute values
item
null
,
numLeft
5
, and
lowCost
"$0.99"
, calling
adCustomizerItem.getAttributeValues()
would return
{numLeft: 5, lowCost: "$0.99"}
.
Returns the end date of the ad customizer item.
Returns the end date of the ad customizer item. For instance, if the end date of the ad customizer item is May 3, 2013, this would return the following object:
{year: 2013, month: 5, day: 3}
.
Returns the type of this entity as a
String
, in this case,
"AdCustomizerItem"
.
Returns the type of this entity as a
String
, in this case,
"AdCustomizerItem"
.
Returns the ID of the ad customizer item.
Returns the scheduling of the ad customizer item.
Returns the start date of the ad customizer item.
Returns the start date of the ad customizer item. For instance, if the start date of the ad customizer item is May 3, 2013, this would return the following object:
{year: 2013, month: 5, day: 3}
.
Returns the name of the target ad group, if it is set.
Returns the name of the target ad group, if it is set. Returns
null
otherwise.
Returns the name of the target campaign, if it is set.
Returns the name of the target campaign, if it is set. Returns
null
otherwise.
Returns the ad customizer item's target keyword text, if it is set.
Returns the ad customizer item's target keyword text, if it is set. Returns
null
otherwise. The text returned will be formatted as follows, depending on the match type:
shoes
- broad match"shoes"
- phrase match[leather shoes]
- exact matchReturns
true
if the ad customizer item specifies mobile device preference.
Returns
true
if the ad customizer item specifies mobile device preference.
Removes the ad customizer item.
Removes the ad customizer item.
Returns nothing.
Sets the named attribute to the given value, or clears its value if
null
is given.
Sets the named attribute to the given value, or clears its value if
null
is given. The value must be consistent with the type of the attribute:
Type | Expected Value Format | Example |
---|---|---|
text | String | "leather shoes" |
number | Number (Integer) | 42 |
price | String | "$4.20" |
date | String in YYYYMMDD HHMMSS format |
"20130505 110000" . Invalid dates such as "20130005 110000" will result in an error (there is no month 0). |
custom id
also requires that the new value is unique across all items in the ad customizer data source.The change will fail and report an error if:
custom id
attribute, another item in the data source has the same value.Related:
Returns nothing.
Sets the named attributes to the respective values.
Sets the named attributes to the respective values. A
null
value will clear any existing value for the attribute. The value must be consistent with the type of the attribute. See
AdCustomizerItem.setAttributeValue
for more information on the expected values for each attribute type. The special attribute
custom id
also requires that the new value is unique across all items in the ad customizer data source.
Examples of the expected value formats for each valid attribute type:
var attributeValues = { item: "leather shoes" // text numLeft: 5, // number lowCost: "$5.99", // price endDate: "20130401 120000"}; // date adCustomizerItem.setAttributeValues(attributeValues);
The change will fail and report an error if:
custom id
attribute, another item in the data source has the same value.Related:
Returns nothing.
Sets the ad customizer item's end date from either an object containing year, month, and day fields, or an 8-digit string in
YYYYMMDD
format.
Sets the ad customizer item's end date from either an object containing year, month, and day fields, or an 8-digit string in
YYYYMMDD
format. For instance,
adCustomizerItem.setEndDate("20130503");
is equivalent to
adCustomizerItem.setEndDate({year: 2013, month: 5, day: 3});
. The change will fail and report an error if:
{year: 2013, month: 5, day: 55}
),Returns nothing.
Sets the ad customizer item's device preference.
Sets the ad customizer item's device preference.
Returns nothing.
Sets the ad customizer item scheduling.
Sets the ad customizer item scheduling. Scheduling of a ad customizer item allows you to control the days of week and times of day during which the ad customizer item will show alongside your ads.
Passing in an empty array clears the scheduling field, causing the ad customizer item to run at all times.
The following example sets the ad customizer item to run on Mondays and Tuesday from 8:00 to 11:00.
var mondayMorning = { dayOfWeek: "MONDAY", startHour: 8, startMinute: 0, endHour: 11, endMinute: 0 }; var tuesdayMorning = { dayOfWeek: "TUESDAY", startHour: 8, startMinute: 0, endHour: 11, endMinute: 0 }; adCustomizerItem.setSchedules([mondayMorning, tuesdayMorning]);
Returns nothing.
Sets the ad customizer item's start date from either an object containing year, month, and day fields, or an 8-digit string in
YYYYMMDD
format.
Sets the ad customizer item's start date from either an object containing year, month, and day fields, or an 8-digit string in
YYYYMMDD
format. For instance,
adCustomizerItem.setStartDate("20130503");
is equivalent to
adCustomizerItem.setStartDate({year: 2013, month: 5, day: 3});
. The change will fail and report an error if:
{year: 2013, month: 5, day: 55}
),Returns nothing.
Sets the target ad group and campaign of the ad customizer item.
Sets the target ad group and campaign of the ad customizer item. This will fail if a target campaign exists. For instance,
adCustomizerItem.setTargetCampaign("Campaign"); adCustomizerItem.setTargetAdGroup("Campaign", "Ad group");will fail on the second statement, while
adCustomizerItem.setTargetCampaign("Campaign"); adCustomizerItem.clearTargetCampaign(); adCustomizerItem.setTargetAdGroup("Campaign", "Ad group");will target the ad group "Ad group" and target the campaign "Campaign".
Returns nothing.
Sets the target campaign of the ad customizer item.
Sets the target campaign of the ad customizer item. This will fail if a target ad group exists. For instance,
adCustomizerItem.setTargetAdGroup("Campaign", "Ad group"); adCustomizerItem.setTargetCampaign("Campaign");will fail on the second statement, while
adCustomizerItem.setTargetAdGroup("Campaign", "Ad group"); adCustomizerItem.clearTargetAdGroup(); adCustomizerItem.setTargetCampaign("Campaign");will target the campaign "Campaign".
Returns nothing.
Sets the target keyword of the ad customizer item.
Sets the target keyword of the ad customizer item. Setting the target keyword to one that does not yet exist in your account will not cause an error, but will prevent the ad customizer item from being used to populate ads (until you create the keyword in your account). The keyword should be formatted based on its match type:
setTargetKeyword('shoes')
- broad matchsetTargetKeyword('"shoes"')
- phrase matchsetTargetKeyword('[leather shoes]')
- exact matchReturns nothing.
Represents an ad customizer data item. Each ad customizer item can be seen as one row in an ad customizer source in the Business Data section of the Shared Library. Ad customizer items have attribute values, which are values that correspond to the attributes of the item's source (see AdCustomizerSource ). These values can be substituted into an ad with placeholders of the form
{=SourceName.AttributeName}
. See the feature guide for more information.