AdWordsApp.​Draft

Represents an AdWords 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:

MemberTypeDescription
getBaseCampaign AdWordsApp.Campaign Returns the base campaign to which this draft belongs.
getDraftCampaign AdWordsApp.Campaign Returns the draft campaign associated with this draft.
getEntityType String Returns the type of this entity as a String, in this case, "Draft".
getId long Returns the ID of the draft.
getName String Returns the name of the draft.
getStatus String Returns the status of the draft.
hasRunningExperiment boolean Returns true if the draft has a currently-running experiment.
newExperimentBuilder AdWordsApp.ExperimentBuilder Returns a new experiment builder for this draft.
remove void Removes the draft, thereby removing its associated draft campaign, but not removing the associated base campaign.
setName void Sets the name of the draft.
startApplying void Starts applying the draft's changes back to the base campaign.

getBaseCampaign()

Returns the base campaign to which this draft belongs.

Return values:

TypeDescription
AdWordsApp.Campaign The base campaign to which this draft belongs.

getDraftCampaign()

Returns the draft campaign associated with this draft.

Return values:

TypeDescription
AdWordsApp.Campaign The draft campaign associated with this draft.

getEntityType()

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

Return values:

TypeDescription
String Type of this entity: "Draft".

getId()

Returns the ID of the draft.

Return values:

TypeDescription
long The ID of the draft.

getName()

Returns the name of the draft.

Return values:

TypeDescription
String Name of the draft.

getStatus()

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

Return values:

TypeDescription
String The status of the draft.

hasRunningExperiment()

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

Return values:

TypeDescription
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:

TypeDescription
AdWordsApp.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:

NameTypeDescription
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.

发送以下问题的反馈:

此网页
Google Ads scripts
Google Ads scripts
需要帮助?请访问我们的支持页面