## Summary

With Shopping campaigns, you bid on a [product group](https://support.google.com/google-ads/answer/6275317) instead of keywords.

You can create product groups after you create an ad group. All inventory items
in a product group have the same bid.

Ad groups within a Shopping campaign can have up to 20,000 product groups.

> [!IMPORTANT]
> **Key Term:** In the Google Ads API, a product group is referred to as a [Listing
> Group](https://developers.google.com/google-ads/api/docs/shopping-ads/create-listing-groups).

## Manual steps

Here are the steps to create product groups through the Google Ads UI.

1. [Create a new Shopping campaign](https://support.google.com/google-ads/answer/3455481) for **All Products**.
2. Create a new ad group.
3. Click **+** next to **All products** to add a subdivision.

   Products groups can be subdivided up to 6 times.
4. Use the following steps to manually add subdivision values as a list:

   1. Select **Bulk add values manually**.
   2. Add each subdivision (one item per line).
   3. Confirm the changes.

   This is only available for some attributes.
5. Set a max CPC bid for each product group. If you use an automated bidding
   strategy, max CPC can be set for you.

For more detail, see [Manage a Shopping campaign with product groups](https://support.google.com/google-ads/answer/6275317).

## Automatic steps

Make sure you have already completed the following:

1. [Link Merchant Center to Google Ads](https://developers.google.com/google-ads/shopping/full-automation/articles/t15.md.txt).
2. Create a new [Shopping campaign](https://developers.google.com/google-ads/shopping/full-automation/articles/t18.md.txt).
3. Create a new [ad group](https://developers.google.com/google-ads/shopping/full-automation/articles/t19.md.txt).
   Here are the steps to create a [Listing Group](https://developers.google.com/google-ads/api/docs/shopping-ads/create-listing-groups.md.txt) through the Google Ads API:

4. Use the following steps to create a root node for the [listing group](https://developers.google.com/google-ads/api/docs/shopping-ads/create-listing-groups.md.txt) tree:

   1. [Create a new listing group](https://developers.google.com/google-ads/api/docs/shopping-ads/create-listing-groups.md.txt#listing_dimensions).
   2. Set the ID of the root to a [temporary value](https://developers.google.com/google-ads/api/docs/shopping-ads/create-listing-groups.md.txt#temporary_ids), for example `-1`.

      Each subdivision must be completely partitioned when you create
      a listing group tree.

      The tree must have a grouping for **other** (**Everything else** in the
      Google Ads UI). Mutate operations won't work if you don't do this
      correctly.
5. Use the following steps to create a child node:

   1. Create a new listing group and set the `ListingGroupType` to one of the following:
      - `UNIT`. This is a leaf node of the tree. Doesn't need to be biddable. You can't bid per unit in Smart Shopping campaigns.
      - `SUBDIVISION`. This splits the tree by another subdivision. Remember to set a temporary ID for the node.
   2. Set the `case_value` of the node to the [`ListingDimensionInfo`](https://developers.google.com/google-ads/api/reference/rpc/latest/ListingDimensionInfo) you
      want to subdivide by (**product attribute** in the Google Ads
      UI), for example `product_brand`.

      To partition a product group by [`ProductBiddingCategory`](https://developers.google.com/google-ads/api/reference/rpc/latest/ProductBiddingCategoryInfo), set the
      value to a numeric ID, not the category string. You can find the ID in
      [`ProductBiddingCategoryConstant`](https://developers.google.com/google-ads/api/reference/rpc/latest/ProductBiddingCategoryConstant#id).
   3. Set the parent ID for the node to the `getId` value of the
      parent subdivision or root node.

   A listing group tree can be no more than seven levels deep.
6. Repeat step five for every `UNIT` of the subdivision at the current
   tree level.

   Include a leaf node with an empty `case_value` for each subdivision. This
   represents all other values.
7. For each `SUBDIVISION` at the current level:

   1. Take note of the ID value. This is the parent ID for the next level.
   2. Follow the tree down a level.
   3. Repeat steps five to seven.
8. Create an [`AdGroupCriterion`](https://developers.google.com/google-ads/api/reference/rpc/latest/AdGroupCriterion) for every `UNIT`. This associates the listing
   group with the ad group.

   Other ad groups and campaigns with lower priority may still bid on
   products that fit the same criteria. Apply [`negative`](https://developers.google.com/google-ads/api/reference/rpc/latest/AdGroupCriterion#negative) to exclude a
   product group from bidding.
9. Enable the ad group to start bidding with the listing group structure.

See [Create a new listing group](https://developers.google.com/google-ads/api/docs/shopping-ads/create-listing-groups.md.txt#listing_dimensions) and the [python example](https://github.com/googleads/google-ads-python/blob/master/examples/shopping_ads/add_shopping_product_listing_group_tree.py)
for more detail.

Here's an example of a listing group tree:

![Diagram of nodes in a listing group tree](https://developers.google.com/static/google-ads/api/images/shopping-listing-group-tree.png "Diagram of nodes in a listing group tree")