Extension 中文

Stay organized with collections Save and categorize content based on your preferences.

This guide provides an overview of the various types of extensions, which are all available in extension setting services, feed services, and asset services.

The "asset" indicates the class to use when managing extensions using asset services. The "extension setting" indicates which extension setting class to use when using extension setting services. The "placeholder type" indicates which PlaceholderType enum value to specify when using feed services. The "placeholder field" indicates which enumeration to use to specify fields when doing the mapping.

Affiliate location extensions

Affiliate location extensions let you to show the retail chains that carry your products, and help users find those stores.

  • Extension setting: AffiliateLocationFeedItem
  • Placeholder type: AFFILIATE_LOCATION
  • Placeholder field: AffiliateLocationPlaceholderField

App extensions

App extensions let you to link directly to your mobile app from your ads. Users can click on the ad headline to be taken to your site, or on the extension to be prompted to install the app directly.

  • Asset: MobileAppAsset
  • Extension setting: AppFeedItem DEPRECATED
  • Placeholder type: APP DEPRECATED
  • Placeholder field: AppPlaceholderField DEPRECATED

Call extensions

Call extensions let you add phone numbers to your ads. Users can tap on the phone number to call your business directly.

  • Asset: CallAsset
  • Extension setting: CallFeedItem DEPRECATED
  • Placeholder type: CALL DEPRECATED
  • Placeholder field: CallPlaceholderField DEPRECATED

Callout extensions

Callout extensions let you include additional text, such as "Free shipping" or "Open 24/7", with your ad.

  • Asset: CalloutAsset
  • Extension setting: CalloutFeedItem DEPRECATED
  • Placeholder type: CALLOUT DEPRECATED
  • Placeholder field: CalloutPlaceholderField DEPRECATED

Hotel callout extensions

Hotel callout extensions let you include additional information (up to 2 lines of customizable text) in your ad inside the hotel booking module.

  • Asset: HotelCalloutAsset
  • Extension setting: HotelCalloutFeedItem DEPRECATED
  • Placeholder type: CALLOUT DEPRECATED
  • Placeholder field: HotelPlaceholderField DEPRECATED

Image extensions

Image extensions (beta) let you upload visuals to complement your existing text ads. These images appear on the Google search results page, along with the ad headlines and descriptions.

  • Asset: ImageAsset
  • Extension setting: ImageFeedItem DEPRECATED
  • Placeholder type: IMAGE DEPRECATED
  • Placeholder field: ImagePlaceholderField DEPRECATED

Lead form extensions

Lead form extensions (beta) help you generate leads by letting users submit a form directly in your ad. This is an asset-based extension.

  • Asset: LeadFormAsset

You can use GoogleAdsService.SearchStream (preferred) or GoogleAdsService.Search to export lead form submission data.

Here are some sample queries. You can choose other fields in the SELECT clause to filter in the WHERE clause.

SELECT
  customer.id
  lead_form_submission_data.resource_name,
  lead_form_submission_data.asset,
  lead_form_submission_data.campaign,
  lead_form_submission_data.ad_group,
  lead_form_submission_data.ad_group_ad,
  lead_form_submission_data.gclid,
  lead_form_submission_data.lead_form_submission_fields,
  lead_form_submission_data.submission_date_time
FROM lead_form_submission_data
WHERE
  lead_form_submission_data.resource_name = 'INSERT_RESOURCE_NAME'

In this case, the lead form submission data resource name is of the format customers/{customer_id}/leadFormSubmissionData/{lead_form_user_submission_id}.

SELECT
  customer.id,
  asset.id,
  asset.name,
  ad_group.id,
  ad_group.name,
  ad_group_ad.ad.id,
  ad_group_ad.ad.name,
  campaign.id,
  campaign.name,
  lead_form_submission_data.gclid
FROM lead_form_submission_data
WHERE
  lead_form_submission_data.resource_name = 'INSERT_RESOURCE_NAME'

Check out lead_form_submission_data for more fields to query.

Location extensions

Location extensions can help users find your locations by showing an address, map, or distance with your ad. Users can tap the extension to get further details on your location.

This is one of the few extensions which hasn't yet been announced as migrating to Assets yet.

  • Extension setting: LocationFeedItem
  • Placeholder type: LOCATION
  • Placeholder field: LocationPlaceholderField

Price extensions

Price extensions appear below your text ad and can show a set of up to 8 cards that users can view to differentiate options and prices. Users can go directly to the item that interest them on your site.

  • Asset: PriceAsset
  • Extension setting: PriceFeedItem DEPRECATED
  • Placeholder type: PRICE DEPRECATED
  • Placeholder field: PricePlaceholderField DEPRECATED

Promotion extensions highlight special sales and offers with your ads.

  • Asset: PromotionAsset
  • Extension setting: PromotionFeedItem DEPRECATED
  • Placeholder type: PROMOTION DEPRECATED
  • Placeholder field: PromotionPlaceholderField DEPRECATED

Sitelink extensions let you add more links to your ads. They can take users to specific pages on your site (for example, a specific product or store hours).

  • Asset: Sitelink
  • Extension setting: SitelinkFeedItem DEPRECATED
  • Placeholder type: SITELINK DEPRECATED
  • Placeholder field: SitelinkPlaceholderField DEPRECATED

Structured snippet extensions

Structured snippet extensions are shown beneath your text ad in the form of a header (for example, "Destinations") and a list of values (for example, "Hawaii, Costa Rica, South Africa"). Only a predefined selection of headers is available (described in detail in the linked article).

  • Asset: StructuredSnippetAsset
  • Extension setting: StructuredSnippetFeedItem DEPRECATED
  • Placeholder type: STRUCTURED_SNIPPET DEPRECATED
  • Placeholder field: StructuredSnippetPlaceholderField DEPRECATED

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 2022-07-13 UTC.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]