Returns the campaign to which this campaign-level phone number belongs.
Returns the two character country code of the advertiser's phone number.
Returns the end date of the campaign-level phone number.
Returns the end date of the campaign-level phone number. For instance, if the end date of the campaign-level phone number 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,
"CampaignPhoneNumber"
.
Returns the type of this entity as a
String
, in this case,
"CampaignPhoneNumber"
.
Returns the ID of the campaign-level phone number.
Returns the advertiser's phone number that gets appended to the ad.
Returns the scheduling of the campaign-level phone number.
Returns the start date of the campaign-level phone number.
Returns the start date of the campaign-level phone number. For instance, if the start date of the campaign-level phone number is May 3, 2013, this would return the following object:
{year: 2013, month: 5, day: 3}
.
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.
Returns
true
if this campaign-level phone number is call only.
Returns
true
if this campaign-level phone number is call only. If
true
, only the advertiser's phone number will get displayed. If
false
, the link to the advertiser's website will be shown alongside.
<aside class="warning">
Deprecated. This functionality has been deprecated. Please see the
announcement blog post for more information.
</aside>
Returns
true
if the campaign-level phone number specifies mobile device preference.
Returns
true
if the campaign-level phone number specifies mobile device preference.
If set to
true
, only the advertiser's phone number will get displayed.
If set to
true
, only the advertiser's phone number will get displayed. If set to
false
, the link to the advertiser's website will be shown as well.
<aside class="warning">
Deprecated. This functionality has been deprecated. It will start throwing errors on June 24, 2015. Please see the
announcement blog post for more information.
</aside>
Returns nothing.
Sets the two character country code of the advertiser's phone number.
Sets the two character country code of the advertiser's phone number.
Returns nothing.
Sets the campaign-level phone number's end date from either an object containing year, month, and day fields, or an 8-digit string in
YYYYMMDD
format.
Sets the campaign-level phone number's end date from either an object containing year, month, and day fields, or an 8-digit string in
YYYYMMDD
format. For instance,
campaignPhoneNumber.setEndDate("20130503");
is equivalent to
campaignPhoneNumber.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 campaign-level phone number's device preference.
Sets the campaign-level phone number's device preference.
Returns nothing.
Sets the advertiser's phone number that gets appended to the ad.
Sets the advertiser's phone number that gets appended to the ad.
Returns nothing.
Sets the campaign-level phone number scheduling.
Sets the campaign-level phone number scheduling. Scheduling of a campaign-level phone number allows you to control the days of week and times of day during which the campaign-level phone number will show alongside your ads.
Passing in an empty array clears the scheduling field, causing the campaign-level phone number to run at all times.
The following example sets the campaign-level phone number 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 }; campaignPhoneNumber.setSchedules([mondayMorning, tuesdayMorning]);
Returns nothing.
Sets the campaign-level phone number's start date from either an object containing year, month, and day fields, or an 8-digit string in
YYYYMMDD
format.
Sets the campaign-level phone number's start date from either an object containing year, month, and day fields, or an 8-digit string in
YYYYMMDD
format. For instance,
campaignPhoneNumber.setStartDate("20130503");
is equivalent to
campaignPhoneNumber.setStartDate({year: 2013, month: 5, day: 3});
. The change will fail and report an error if:
{year: 2013, month: 5, day: 55}
),Returns nothing.
Represents a phone number that has been added to a campaign as an ad call extension. Visit our Ad Extensions page for more information on phone numbers and other types of ad extensions.