You can use your Google Merchant Center (GMC) product feed to create product ads
in your Demand Gen campaigns.

To do so, complete the following steps:

1. Associate a Google Merchant Center account with a Demand Gen campaign using [`CampaignService`](https://developers.google.com/google-ads/api/reference/rpc/v26/CampaignService).
2. Create an ad group and one or more supported ad types using [`AdGroupService`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdGroupService) and [`AdGroupAdService`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdGroupAdService).
3. Use `ListingGroup` criteria with [`AdGroupCriterionService`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdGroupCriterionService) to control which products in your feed are included in the ad group.

You can perform these steps during campaign creation or apply them later to
enable product ads on an existing Demand Gen campaign.

## Associate a Merchant Center account with a Demand Gen campaign

Complete the following prerequisites:

- Obtain the ID of the Merchant Center account that contains the products to advertise.
- Verify that the Merchant Center account is [linked](https://developers.google.com/google-ads/shopping/full-automation/articles/t15) to the Google Ads account.

To associate a Merchant Center account with a Demand Gen campaign, attach a
[`ShoppingSetting`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign.ShoppingSetting) to your `Campaign`
and configure:

- `merchant_id`: Set to the ID of the Merchant Center account containing the products to advertise.
- `feed_label`: (Optional) Set to the feed label string if you want to target a specific product feed within the Merchant Center account.

## Create ads

Demand Gen product ads support three ad types through
[`AdGroupAdService`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdGroupAdService):

- [`DemandGenMultiAssetAdInfo`](https://developers.google.com/google-ads/api/reference/rpc/v26/DemandGenMultiAssetAdInfo): Includes marketing images (`marketing_images`, `square_marketing_images`, `portrait_marketing_images`, `tall_portrait_marketing_images`) that serve as fallback creatives when product details can't be shown.
- [`DemandGenVideoResponsiveAdInfo`](https://developers.google.com/google-ads/api/reference/rpc/v26/DemandGenVideoResponsiveAdInfo): Adds [video
  assets](https://developers.google.com/google-ads/api/docs/assets/upload-videos) (`videos`) to product ads to expand reach across YouTube placements. Requires `business_name` (and starting in `v24`, `videos` and `logo_images`).
- [`DemandGenProductAdInfo`](https://developers.google.com/google-ads/api/reference/rpc/v26/DemandGenProductAdInfo): Renders product-only ad formats using feed data alongside `headline`, `description`, `logo_image`, and `business_name`.

Depending on the ad type, you must provide text and image assets (such as
`headlines`/`headline`, `descriptions`/`description`,
`logo_images`/`logo_image`, and `business_name`). Refer to the reference
documentation for each ad type and the [Demand Gen asset guidelines and best
practices](https://support.google.com/google-ads/answer/13704860) when constructing your ads.

## Restrict which products are included in the ad group

Just as with Shopping campaigns, you can create a tree of [listing group
criteria](https://developers.google.com/google-ads/api/docs/shopping-ads/create-listing-groups) (`ListingGroupInfo`) using
[`AdGroupCriterionService`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdGroupCriterionService) to partition
your products across dimensions (starting with a root `UNIT` or `SUBDIVISION`
node) and include or exclude specific product groups.

We recommend including at least one root listing group criterion in each Demand
Gen product ad group, even if it targets all products (`UNIT` at the root), to
enable complete product-level [reporting](https://developers.google.com/google-ads/api/docs/demand-gen/reporting).