AdsApp.AdTypeSpace
Stay organized with collections
Save and categorize content based on your preferences.
Starting point for determining the type of an ad.
For types that are not fully supported, use Ad.getType instead.
Typical usage:
if (ad.isType().expandedTextAd()) {
var expandedTextAd = ad.asType().expandedTextAd();
var headlinePart1 = expandedTextAd.getHeadlinePart1();
}
Methods:
expandedTextAd()
Returns whether the ad is an
ExpandedTextAd.
Return values:
imageAd()
Returns whether the ad is an
ImageAd.
Return values:
Type | Description |
boolean |
Whether the ad is an ImageAd. |
responsiveDisplayAd()
Returns whether the ad is a
ResponsiveDisplayAd.
Return values:
responsiveSearchAd()
Returns whether the ad is a
ResponsiveSearchAd.
Return values:
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 2024-12-18 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 2024-12-18 UTC."],[[["Provides a starting point for determining the type of an ad in Google Ads scripts."],["Offers methods like `expandedTextAd()`, `imageAd()`, `responsiveDisplayAd()`, and `responsiveSearchAd()` to check the ad type."],["Each method returns a boolean value indicating whether the ad is of the specified type."],["For unsupported ad types, use the `Ad.getType()` method instead."]]],[]]