AdsApp.VideoYouTubeVideo
Stay organized with collections
Save and categorize content based on your preferences.
Represents a Google Ads YouTube Video in a Video Campaign. Methods:
bidding()
Provides access to bidding fields of this video YouTube video. Return values:
getEntityType()
Returns the type of this entity as a String
, in this case, "VideoYouTubeVideo"
. Return values:
getId()
Returns the ID of the video YouTube video. Return values:
getResourceName()
Returns the resource name of the video YouTube video. Return values:
getStatsFor(dateRange)
Returns stats for the specified date range. Supported values: TODAY, YESTERDAY, LAST_7_DAYS, THIS_WEEK_SUN_TODAY, LAST_WEEK,
LAST_14_DAYS, LAST_30_DAYS, LAST_BUSINESS_WEEK, LAST_WEEK_SUN_SAT,
THIS_MONTH, LAST_MONTH, ALL_TIME
.
Example:
var
stats
=
youTubeVideo
.
getStatsFor
(
"THIS_MONTH"
);
Arguments:
Return values:
getStatsFor(dateFrom, dateTo)
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. Arguments:
Return values:
getVideoAdGroup()
Returns the ad group to which this video YouTube video belongs. Return values:
getVideoCampaign()
Returns the campaign to which this video YouTube video belongs. Return values:
getVideoId()
Returns the YouTube video ID. Return values:
isEnabled()
Returns true
if the video YouTube video is enabled. Return values:
isManaged()
Returns true
if the YouTube video is managed. Returns false
if the placement is automatic. Return values:
isPaused()
Returns true
if the video YouTube video is paused. Return values:
remove()
Removes the video YouTube video. Returns nothing.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eRepresents a YouTube video within a Google Ads Video Campaign.\u003c/p\u003e\n"],["\u003cp\u003eProvides methods to access and manage video settings, such as bidding, ID, and status (enabled, paused).\u003c/p\u003e\n"],["\u003cp\u003eAllows retrieval of performance statistics for specific date ranges.\u003c/p\u003e\n"],["\u003cp\u003eEnables association with its parent ad group and campaign.\u003c/p\u003e\n"],["\u003cp\u003eOffers functionality to remove the video from the campaign.\u003c/p\u003e\n"]]],[],null,[]]