Similar to Performance Max [reporting](https://developers.google.com/google-ads/api/performance-max/reporting), use
[`GoogleAdsService.SearchStream`](https://developers.google.com/google-ads/api/reference/rpc/v26/GoogleAdsService/SearchStream)
to retrieve campaign and asset group metadata to troubleshoot common issues.

## Campaign troubleshooting

If your Performance Max campaign isn't performing as expected, it could be due
to specific problems with your ads, bidding, targeting, conversion tracking, or
campaign settings. See the following guides for troubleshooting steps:

- [Performance Max campaign setup issues](https://support.google.com/google-ads/answer/10732484)
- [Performance Max campaign not running or low traffic](https://support.google.com/google-ads/answer/12131516)
- [Performance Max spend increase](https://support.google.com/google-ads/troubleshooter/14227323)

### Campaigns with brand guidelines enabled

Use [brand guidelines](https://support.google.com/google-ads/answer/14934472) to
control how your brand is represented in Performance Max campaigns. You can use
[`Campaign.brand_guidelines_enabled`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign#brand_guidelines_enabled)
to verify that brand guidelines have been enabled for a campaign.

Performance Max campaigns with [`Campaign.brand_guidelines_enabled`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign#brand_guidelines_enabled) set to `true` use
campaign-level brand assets
([`BUSINESS_NAME`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetFieldTypeEnum.AssetFieldType#business_name),
[`LOGO`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetFieldTypeEnum.AssetFieldType#logo), and
[`LANDSCAPE_LOGO`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetFieldTypeEnum.AssetFieldType#landscape_logo)),
and must have

- Exactly one `BUSINESS_NAME` asset
- At least one `LOGO` asset

> [!IMPORTANT]
> **Important:** All of these brand assets must be linked to the campaigns as [`CampaignAsset`](https://developers.google.com/google-ads/api/reference/rpc/v26/CampaignAsset) resources. Performance Max retail campaigns (online sales with a product feed) are exempt from these requirements when no custom [`AssetGroupAsset`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetGroupAsset) resources (other than HTML5 `MEDIA_BUNDLE` assets) are linked to the campaign.

If you fail to link these [`CampaignAsset`](https://developers.google.com/google-ads/api/reference/rpc/v26/CampaignAsset)
resources when required, you can receive an error of either
[`CampaignError.REQUIRED_BUSINESS_NAME_ASSET_NOT_LINKED`](https://developers.google.com/google-ads/api/reference/rpc/v26/CampaignErrorEnum.CampaignError#required_business_name_asset_not_linked)
or
[`CampaignError.REQUIRED_LOGO_ASSET_NOT_LINKED`](https://developers.google.com/google-ads/api/reference/rpc/v26/CampaignErrorEnum.CampaignError#required_logo_asset_not_linked),
depending on the missing asset type. These errors can be triggered for brand
guidelines-enabled campaigns by any of the following actions:

- Creating a new [`Campaign`](https://developers.google.com/google-ads/api/reference/rpc/v26/Campaign) without providing both `BUSINESS_NAME` and `LOGO` as `CampaignAsset` resources in the same request.
- Removing one or more `CampaignAsset` resources that would result in the campaign no longer meeting the [minimum brand asset requirements](https://developers.google.com/google-ads/api/performance-max/asset-requirements).
- Linking required asset group-level custom assets to a previously [assetless Performance Max retail campaign](https://developers.google.com/google-ads/api/performance-max/structure-requests#minimum-requirements-for-a-valid-serving-retail-performance-max-campaign) without providing all required `CampaignAsset` resources in the same request. (Linking only optional custom assets such as `YOUTUBE_VIDEO` also requires both the [minimum asset group requirements](https://developers.google.com/google-ads/api/performance-max/asset-requirements) and required `CampaignAsset` brand links so the asset group does not enter an unsupported state that blocks edits in the Google Ads UI.)

Attempting to link brand assets at the wrong level will also generate errors,
which you can fix as follows:

- [`AssetLinkError.BRAND_ASSETS_NOT_LINKED_AT_CAMPAIGN_LEVEL`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetLinkErrorEnum.AssetLinkError#brand_assets_not_linked_at_campaign_level)
  - link the brand assets using the `CampaignAsset` resource because brand guidelines are enabled for the campaign.
- [`AssetLinkError.BRAND_ASSETS_NOT_LINKED_AT_ASSET_GROUP_LEVEL`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetLinkErrorEnum.AssetLinkError#brand_assets_not_linked_at_asset_group_level)
  - link the brand assets using the `AssetGroupAsset` resource because brand guidelines are not enabled for the campaign.

## Asset group troubleshooting

Use the [`asset_group.primary_status`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetGroup#primary_status)
and
[`asset_group.primary_status_reasons`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetGroup#primary_status_reasons%5B%5D)
fields to provide insights into an asset group's performance.

    SELECT
      asset_group.resource_name,
      asset_group.primary_status,
      asset_group.primary_status_reasons
    FROM asset_group
    WHERE asset_group.resource_name = "customers/CUSTOMER_ID/assetGroups/ASSET_GROUP_ID"

Similarly, use the
[`asset_group_asset.primary_status`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetGroupAsset#primary_status),
[`asset_group_asset.primary_status_details`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetGroupAsset#primary_status_details%5B%5D),
and
[`asset_group_asset.primary_status_reasons`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetGroupAsset#primary_status_reasons%5B%5D)
fields to show whether an asset group asset is serving, or the reasons why it's
not.

    SELECT
      asset_group_asset.resource_name,
      asset_group_asset.primary_status,
      asset_group_asset.primary_status_reasons,
      asset_group_asset.primary_status_details
    FROM asset_group_asset
    WHERE asset_group_asset.resource_name = "customers/CUSTOMER/assetGroupAssets/ASSET_GROUP_ID~ASSET_ID~FIELD_TYPE"

### Common asset group errors

If your request to create an `AssetGroup` or update its linked
`AssetGroupAsset` resources fails with a `NOT_ENOUGH_*_ASSET`
[`AssetGroupError`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetGroupErrorEnum.AssetGroupError) (such as
[`AssetGroupError.NOT_ENOUGH_MARKETING_IMAGE_ASSET`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetGroupErrorEnum.AssetGroupError#not_enough_marketing_image_asset)),
your `AssetGroup` does not meet the [minimum asset requirements](https://developers.google.com/google-ads/api/performance-max/asset-requirements).
This error occurs when you create a standard `AssetGroup` with missing required
assets, link required custom assets to an assetless
[retail `AssetGroup`](https://developers.google.com/google-ads/api/performance-max/asset-groups#link-asset-groups-to-assets-in-performance-max-retail-campaigns) without providing all required assets, or
remove required assets without unlinking all custom assets in a single retail
request. (Linking only optional custom assets such as `YOUTUBE_VIDEO` also
requires all minimum required assets so the asset group does not enter an
unsupported state that blocks edits in the Google Ads UI.)

For example, an `AssetGroupError.NOT_ENOUGH_MARKETING_IMAGE_ASSET` error
indicates the request was submitted without the minimum number of
[`MARKETING_IMAGE`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetFieldTypeEnum.AssetFieldType#marketing_image) assets (one in this case). To fix this
error, submit your request as a
[bulk mutate request](https://developers.google.com/google-ads/api/docs/mutating/bulk-mutate) using the
[`GoogleAdsService.Mutate`](https://developers.google.com/google-ads/api/reference/rpc/v26/GoogleAdsService/Mutate) method
containing the
[`asset_group_operation`](https://developers.google.com/google-ads/api/reference/rpc/v26/MutateOperation#asset_group_operation)
(when creating a new asset group) and all required
[`asset_group_asset_operation`](https://developers.google.com/google-ads/api/reference/rpc/v26/MutateOperation#asset_group_asset_operation) entries, as demonstrated
in [Link asset groups to assets](https://developers.google.com/google-ads/api/performance-max/asset-groups#link-asset-groups-to-assets).

In this example, the list of mutate operations in the bulk mutate request must
include at least one [`AssetGroupAsset`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetGroupAsset) with a
[`field_type`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetFieldTypeEnum.AssetFieldType) of
`MARKETING_IMAGE`. The asset referenced by the `AssetGroupAsset` must also meet
the specifications for a `MARKETING_IMAGE`.

Similarly, if your request to create an `AssetGroup` fails with an
[`AssetGroupError.SHORT_DESCRIPTION_REQUIRED`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetGroupErrorEnum.AssetGroupError#short_description_required),
this means your `AssetGroup` was missing a `TEXT` asset with 60 characters or
less and a `field_type` of `DESCRIPTION`. The steps to fix this issue are the
same as shown in the `NOT_ENOUGH_MARKETING_IMAGE_ASSET` example. However, the
request must include at least one `AssetGroupAsset` with a `field_type` of
`DESCRIPTION`, and the asset referenced by the `AssetGroupAsset` must be 60
characters or less.

See [Common errors](https://developers.google.com/google-ads/api/performance-max/common-errors) for a list of common errors and how to fix
them.

## Find asset source for troubleshooting

Performance Max is unique in that it serves ads containing assets that are
uploaded by advertisers and automatically generated by Google. As an advertiser,
it can be beneficial to know the source of the asset to troubleshoot or evaluate
performance, in which case you can use the [`asset_group_asset.source`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetGroupAsset#source) field as follows:

    SELECT
      asset.id,
      asset.name,
      asset_group.id,
      asset_group_asset.source
    FROM asset_group_asset
    WHERE campaign.id = CAMPAIGN_ID

## Conversion values from new customer acquisition goal

Reported conversion values could be higher than those you manually upload if
you've set up [new customer
acquisition](https://support.google.com/google-ads/answer/12080169) in your
Performance Max or Search campaigns. If you've selected **New Customer Value
mode (Bid higher)**, your all-new-customer lifetime value is added to your
conversion action's conversion value. The all-new-customer lifetime value is
only available through the Google Ads web interface.

If you need to calculate conversion values omitting the all-new-customer
lifetime value, refer to the following pseudo code. The all-new-customer
lifetime value can be downloaded from the Google Ads web interface.

    nonNewCustomerAcquisitionConversionValueTotal = 0;
    // For each campaign that has that conversion...
    for (campaign in campaigns) {
      // If the new customer acquisition value is 'Bid higher', then subtract.
      if (bidHigher == true) {
        nonNewCustomerAcquisitionConversionValueTotal +=
            campaign.allConversionsValue - campaign.allNewCustomerLifetimeValue;
      }
      // If the new customer acquisition value is 'Only bid' or not set, then don't subtract.
      else {
        nonNewCustomerAcquisitionConversionValueTotal += campaign.allConversionsValue;
      }
    }