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:
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 |
long |
The ID of the draft. |
getName()
Returns the name of the draft.
Return values:
Type | Description |
String |
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:
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.