Trait

com.google.appsscript.adwords

Campaign

Related Doc: package adwords

Permalink

trait Campaign extends Object with CampaignLike

Represents an AdWords campaign.

Annotations
@RawJSType()
Linear Supertypes
CampaignLike, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Campaign
  2. CampaignLike
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def adGroups(): AdGroupSelector

    Permalink

    Returns the selector of all ad groups in the campaign.

  5. def addAdSchedule(dayOfWeek: String, startHour: Int, startMinute: Int, endHour: Int, endMinute: Int, bidModifier: Double): Unit

    Permalink

    Creates an ad schedule criterion.

    Creates an ad schedule criterion. Once created, the campaign will start showing ads during the specified time.

    For instance, this will create an ad schedule covering Saturday mornings:

     var campaign = AdWordsApp.campaigns().get().next();
     campaign.addAdSchedule("SATURDAY", 7, 0, 11, 0);
    

    This will create the same schedule, but with a bid modifier of 1.1:

     var campaign = AdWordsApp.campaigns().get().next();
     campaign.addAdSchedule("SATURDAY", 7, 0, 11, 0, 1.1);
    

    One thing to keep in mind is that, by default, campaigns have no ad schedule criteria and hence serve ads at all times. Adding the first ad schedule to a campaign will cause ads to be shown during that time only.

    Returns nothing.

    Definition Classes
    CampaignLike
  6. def addCallout(calloutExtension: Callout): Operation[Callout]

    Permalink

    Adds a callout extension to this campaign.

    Adds a callout extension to this campaign. See also Extensions.newCalloutBuilder()

  7. def addLocation(locationId: Int, bidModifier: Double): Unit

    Permalink

    Creates a location target in this campaign from a location ID and bid modifier.

    Creates a location target in this campaign from a location ID and bid modifier. Once created, the campaign will start showing ads to the location with the given location ID.

    For instance, this will create a location target for Tennessee with a bid modifier of 1.15:

     var campaign = AdWordsApp.campaigns().get().next();
     campaign.addLocation(21175, 1.15);
    

    Returns nothing.

    Definition Classes
    CampaignLike
  8. def addMobileApp(mobileAppExtension: MobileApp): Operation[MobileApp]

    Permalink

    Adds a mobile app extension to this campaign.

    Adds a mobile app extension to this campaign. See also Extensions.newMobileAppBuilder()

  9. def addPhoneNumber(phoneNumberExtension: PhoneNumber): Operation[PhoneNumber]

    Permalink

    Adds a phone number extension to this campaign.

    Adds a phone number extension to this campaign. See also Extensions.newPhoneNumberBuilder()

  10. def addProximity(latitude: Double, longitude: Double, radius: Double, radiusUnits: String, optArgs: AnyRef): Unit

    Permalink

    Creates a proximity target in this campaign.

    Creates a proximity target in this campaign. Once created, the campaign will start showing ads to geographical points within the specified radius of the specified central point.

    For instance, this will create a proximity targeting 20km around Google headquarters:

     var campaign = AdWordsApp.campaigns().get().next();
     campaign.addProximity(37.423021, -122.083739, 20, "KILOMETERS");
    
    Similarly, to create the same proximity target with a bid modifier and address:
     campaign.addProximity(37.423021, -122.083739, 20, "KILOMETERS", {
       bidModifier: 1.15,
       address: {
         streetAddress: "1600 Amphitheatre Parkway",
         cityName: "Mountain View",
         provinceName: "California",
         provinceCode: "CA",
         postalCode: "94043",
         countryCode: "US"
       }
     });
    

    Returns nothing.

    Definition Classes
    CampaignLike
  11. def addReview(reviewExtension: Review): Operation[Review]

    Permalink

    Adds a review extension to this campaign.

    Adds a review extension to this campaign. See also Extensions.newReviewBuilder()

  12. def addSitelink(sitelinkExtension: Sitelink): Operation[Sitelink]

    Permalink

    Adds a sitelink extension to this campaign.

    Adds a sitelink extension to this campaign. See also Extensions.newSitelinkBuilder()

  13. def ads(): AdSelector

    Permalink

    Returns the selector of all ads in the campaign.

  14. def applyLabel(name: String): Unit

    Permalink

    Applies a label to the campaign.

    Applies a label to the campaign. name of the label is case-sensitive. Operation will fail if the label with the specified name does not already exist in the account.

    Note that the campaign cannot not have more than 50 labels.

    Returns nothing.

    Definition Classes
    CampaignLike
  15. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  16. def bidding(): CampaignBidding

    Permalink

    Provides access to this campaign's bidding fields.

  17. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. def createNegativeKeyword(keywordText: String): Unit

    Permalink

    Creates a new campaign-level negative keyword with the specified text.

    Creates a new campaign-level negative keyword with the specified text. Match type for the new negative keyword is specified as follows:

    • createNegativeKeyword("shoes") - broad match.
    • createNegativeKeyword("\"shoes\"") - phrase match.
    • createNegativeKeyword("[leather shoes]") - exact match.

    Returns nothing.

    Definition Classes
    CampaignLike
  19. def display(): CampaignDisplay

    Permalink

    Provices access to this campaign's display criteria: Audience , ExcludedAudience , DisplayKeyword , ExcludedDisplayKeyword , Placement , ExcludedPlacement , Topic , and ExcludedTopic .

    Provices access to this campaign's display criteria: Audience , ExcludedAudience , DisplayKeyword , ExcludedDisplayKeyword , Placement , ExcludedPlacement , Topic , and ExcludedTopic .

  20. def enable(): Unit

    Permalink

    Enables the campaign.

    Enables the campaign.

    Returns nothing.

    Definition Classes
    CampaignLike
  21. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  23. def excludeLocation(locationOrId: AnyRef): Unit

    Permalink

    Creates a location exclusion in this campaign.

    Creates a location exclusion in this campaign. Once created, the campaign will not show ads to the location with the given location ID.

    This method accepts three forms of input:

    • A simple location ID. For a list of locations and their corresponding IDs, please see the AdWords API documentation on geotargeting:
       var campaign = AdWordsApp.campaigns().get().next();
       campaign.excludeLocation(21175);
      
    • Existing TargetedLocation or ExcludedLocation objects, perhaps from another campaign:
       var campaigns = AdWordsApp.campaigns().get();
       var campaign1 = campaigns.next();
       var campaign2 = campaigns.next();
       var location = campaign1.targeting().excludedLocations().get().next();
       campaign2.excludeLocation(location);
      
    • Plain JavaScript objects describing a location. For instance, this would create a location exclusion for Tennessee:
       var campaign = AdWordsApp.campaigns().get().next();
       campaign.excludeLocation({
         id: 21175
       });
      
      The only field of the object which will be looked at is id, which represents the location ID.

    Returns nothing.

    }); Returns nothing.

    Definition Classes
    CampaignLike
  24. def extensions(): CampaignExtensions

    Permalink

    Provides access to this campaign's extensions: CampaignCallout , CampaignMobileApp , CampaignPhoneNumber , CampaignReview , and CampaignSitelink .

    Provides access to this campaign's extensions: CampaignCallout , CampaignMobileApp , CampaignPhoneNumber , CampaignReview , and CampaignSitelink .

  25. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def getAdRotationType(): String

    Permalink

    Returns the ad rotation type of the campaign.

    Returns the ad rotation type of the campaign. Possible return values:

    OPTIMIZE, CONVERSION_OPTIMIZE, ROTATE, ROTATE_FOREVER

    Definition Classes
    CampaignLike
  27. def getBiddingStrategyType(): String

    Permalink

    Returns the bidding strategy type of the campaign.

    Returns the bidding strategy type of the campaign. Possible return values:

    MANUAL_CPC, MANUAL_CPM, BUDGET_OPTIMIZER, CONVERSION_OPTIMIZER, PERCENT_CPA

    Definition Classes
    CampaignLike
  28. def getBudget(): Budget

    Permalink

    Returns the budget of the campaign.

    Returns the budget of the campaign. In order to change the campaign's budget, use Budget.setAmount(double) .

    Definition Classes
    CampaignLike
  29. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  30. def getEndDate(): AdWordsDate

    Permalink

    Returns the campaign's end date, or null if there is no end date.

    Returns the campaign's end date, or null if there is no end date. For instance, if a campaign ended on May 3, 2013, this would return the following object: {year: 2013, month: 5, day: 3} .

    Definition Classes
    CampaignLike
  31. def getEntityType(): String

    Permalink

    Returns the type of this entity as a String , in this case, "Campaign" .

    Returns the type of this entity as a String , in this case, "Campaign" .

    Definition Classes
    CampaignLike
  32. def getId(): Long

    Permalink

    Returns the ID of the campaign.

    Returns the ID of the campaign.

    Definition Classes
    CampaignLike
  33. def getName(): String

    Permalink

    Returns the name of the campaign.

    Returns the name of the campaign.

    Definition Classes
    CampaignLike
  34. def getStartDate(): AdWordsDate

    Permalink

    Returns the campaign's start date.

    Returns the campaign's start date. For instance, if a campaign started on May 3, 2013, this would return the following object: {year: 2013, month: 5, day: 3} .

    Definition Classes
    CampaignLike
  35. def getStatsFor(dateFrom: AnyRef, dateTo: AnyRef): Stats

    Permalink

    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.

    Definition Classes
    CampaignLike
  36. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  37. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  38. def isEnabled(): Boolean

    Permalink

    Returns true if the campaign is enabled.

    Returns true if the campaign is enabled.

    Definition Classes
    CampaignLike
  39. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  40. def isPaused(): Boolean

    Permalink

    Returns true if the campaign is paused.

    Returns true if the campaign is paused.

    Definition Classes
    CampaignLike
  41. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  42. def isRemoved(): Boolean

    Permalink

    Returns true if the campaign is removed.

    Returns true if the campaign is removed.

  43. def keywords(): KeywordSelector

    Permalink

    Returns the selector of all keywords in the campaign.

  44. def labels(): LabelSelector

    Permalink

    Creates a selector of all labels applied to the campaign.

    Creates a selector of all labels applied to the campaign.

    Definition Classes
    CampaignLike
  45. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  46. def negativeKeywords(): NegativeKeywordSelector

    Permalink

    Returns a selector of the campaign-level negative keywords belonging to this campaign.

    Returns a selector of the campaign-level negative keywords belonging to this campaign.

    Note that this selector will not return any negative keywords belonging to this campaign's child ad groups — it only returns campaign-level negative keywords.

    Definition Classes
    CampaignLike
  47. def newAdGroupBuilder(): AdGroupBuilder

    Permalink

    Returns a new ad group builder for this campaign.

    Returns a new ad group builder for this campaign. Once builder.create() is called, the ad group will be created in this campaign.

  48. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  49. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  50. def pause(): Unit

    Permalink

    Pauses the campaign.

    Pauses the campaign.

    Returns nothing.

    Definition Classes
    CampaignLike
  51. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  52. def removeCallout(calloutExtension: Callout): Unit

    Permalink

    Removes a callout extension from this campaign.

    Removes a callout extension from this campaign.

    Returns nothing.

  53. def removeLabel(name: String): Unit

    Permalink

    Removes a label from the campaign.

    Removes a label from the campaign. name of the label is case-sensitive. Operation will fail if the label with the specified name does not already exist in the account.

    Returns nothing.

    Definition Classes
    CampaignLike
  54. def removeMobileApp(mobileAppExtension: MobileApp): Unit

    Permalink

    Removes a mobile app extension from this campaign.

    Removes a mobile app extension from this campaign.

    Returns nothing.

  55. def removePhoneNumber(phoneNumberExtension: PhoneNumber): Unit

    Permalink

    Removes a phone number extension from this campaign.

    Removes a phone number extension from this campaign.

    Returns nothing.

  56. def removeReview(reviewExtension: Review): Unit

    Permalink

    Removes a review extension from this campaign.

    Removes a review extension from this campaign.

    Returns nothing.

  57. def removeSitelink(sitelinkExtension: Sitelink): Unit

    Permalink

    Removes a sitelink extension from this campaign.

    Removes a sitelink extension from this campaign.

    Returns nothing.

  58. def setAdRotationType(adRotationType: String): Unit

    Permalink

    Sets the ad rotation type of the campaign.

    Sets the ad rotation type of the campaign. For instance, campaign.setAdRotationType("OPTIMIZE"); instructs AdWords to optimize ad serving based on the campaign's CTR. For more information, see Choose an ad delivery method help article.

    Returns nothing.

    Definition Classes
    CampaignLike
  59. def setEndDate(date: AnyRef): Unit

    Permalink

    Sets the campaign's end date from either an object containing year, month, and day fields, or an 8-digit string in YYYYMMDD format.

    Sets the campaign's end date from either an object containing year, month, and day fields, or an 8-digit string in YYYYMMDD format. For instance, campaign.setEndDate("20130503"); is equivalent to campaign.setEndDate({year: 2013, month: 5, day: 3}); . The change will fail and report an error if:

    • the given date is invalid (e.g., {year: 2013, month: 5, day: 55}),
    • it's a date in the past, or
    • it's a date after the latest allowed end date of December 30, 2037.

    Returns nothing.

    Definition Classes
    CampaignLike
  60. def setName(name: String): Unit

    Permalink

    Sets the name of the campaign.

    Sets the name of the campaign.

    Returns nothing.

    Definition Classes
    CampaignLike
  61. def setStartDate(date: AnyRef): Unit

    Permalink

    Sets the campaign's start date from either an object containing year, month, and day fields, or an 8-digit string in YYYYMMDD format.

    Sets the campaign's start date from either an object containing year, month, and day fields, or an 8-digit string in YYYYMMDD format. For instance, campaign.setStartDate("20130503"); is equivalent to campaign.setStartDate({year: 2013, month: 5, day: 3}); . The change will fail and report an error if:

    • the campaign has already started,
    • the given date is invalid (e.g., {year: 2013, month: 5, day: 55}),
    • the given date is after the campaign's end date,
    • it's a date in the past, or
    • it's a date after the latest allowed end date of December 30, 2037.

    Returns nothing.

    Definition Classes
    CampaignLike
  62. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  63. def targeting(): Targeting

    Permalink

    Provides access to campaign-level targeting criteria: device targeting, ad scheduling, and location targeting.

    Provides access to campaign-level targeting criteria: device targeting, ad scheduling, and location targeting.

    Definition Classes
    CampaignLike
  64. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  65. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  66. def urls(): CampaignUrls

    Permalink

    Provides access to this campaign's URL fields.

    Provides access to this campaign's URL fields. See Using Upgraded URLs for more information.

  67. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  68. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  69. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  70. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from CampaignLike

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped