AdsApp.​Draft

Represents a Google Ads draft. Drafts can be used to prepare changes to campaigns, either by applying them directly or running an experiment. For more information, refer to our guide to Drafts and Experiments.

Methods:

Member Type Description
AdsApp.Campaign Returns the base campaign to which this draft belongs.
AdsApp.Campaign Returns the draft campaign associated with this draft.
String Returns the type of this entity as a String , in this case, "Draft" .
String Returns the ID of the draft.
String Returns the name of the draft.
String Returns the resource name of the draft.
String Returns the status of the draft.
boolean Returns true if the draft has a currently-running experiment.
AdsApp.ExperimentBuilder
void Removes the draft, thereby removing its associated draft campaign, but not removing the associated base campaign.
void Sets the name of the draft.
void Starts applying the draft's changes back to the base campaign.

getBaseCampaign()

Returns the base campaign to which this draft belongs.

Return values:

Type Description
AdsApp.Campaign The base campaign to which this draft belongs.

getDraftCampaign()

Returns the draft campaign associated with this draft.

Return values:

Type Description
AdsApp.Campaign The draft campaign associated with this draft.

getEntityType()

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

Return values:

Type Description
String Type of this entity: "Draft" .

getId()

Returns the ID of the draft.

Return values:

Type Description
String The ID of the draft.

getName()

Returns the name of the draft.

Return values:

Type Description
String Name of the draft.

getResourceName()

Returns the resource name of the draft.

Return values:

Type Description
String The resource name of the draft.

getStatus()

Returns the status of the draft. Possible values: DRAFTED , APPLIED , APPLYING , REMOVED , UNABLE_TO_APPLY .

Return values:

Type Description
String The status of the draft.

hasRunningExperiment()

Returns true if the draft has a currently-running experiment.

Return values:

Type Description
boolean true if the draft has a currently-running experiment.

newExperimentBuilder()

Returns a new experiment builder for this draft. Once built, the experiment will run with the changes made in this draft.

Return values:

Type Description
AdsApp.ExperimentBuilder A new experiment builder for this draft.

remove()

Removes the draft, thereby removing its associated draft campaign, but not removing the associated base campaign.

Returns nothing.

setName(name)

Sets the name of the draft.

Returns nothing.

Arguments:

Name Type Description
name
String The new name for the draft.

startApplying()

Starts applying the draft's changes back to the base campaign. Does not wait for completion. View this draft in the "All drafts" tab of the UI to see if its changes are finished being applied.

Returns nothing.

Create a Mobile Website
View Site in Mobile | Classic
Share by: