Using the CONTAINER function

The CONTAINER(...) function checks if the container matches a filter. The "container" is the immediate owner of an item. For example, for keywords or ad group-level audiences, the container would be the ad group. For ad groups or campaign-level sitelinks, the container would be the campaign. And for campaigns, account-level assets, or items from the shared library, the container would be the account itself.

Syntax

CONTAINER(filter)
  • filter -- owning containers must match these filter conditions.

Examples

CONTAINER( labels = ("abc", "xyz") )

Checks if the owning ad group or campaign has the labels "abc" or "xyz" applied.

CONTAINER( status = enabled CONTAINER(bidstrategytype = enhancedcpc) )

If applied to keywords, or any items under ad groups, checks if the owning ad group is enabled and its owning campaign has a bid strategy type of "Enhanced CPC".

CONTAINER( COUNT(keywords, status = enabled) < 100 )

Checks if the owning container has less than 100 enabled keywords. If applied to campaigns, this filter will count the enabled keywords in the entire account (the container of the campaign).

Notes

  • If there are multiple conditions in the filter, they must all match for the item to be considered. They can be wrapped in an OR function to look for items matching any of the conditions. For example, CONTAINER(OR(status = enabled adrotation = optimize)) will check if the owning ad group is enabled or has an optimized ad rotation, or both.
  • For items which can exist at multiple levels, the filter can contain conditions that only apply to some of those levels. Conditions that don't apply to a particular level will be ignored. For example, if CONTAINER(bidstrategytype = maximizeclicks targetingoptimization = conservative) is used to filter audiences, which can be campaign-level or ad group-level, it would find all campaign-level audiences whose campaign uses a "Maximize Clicks" bid strategy type and ad group-level audiences whose ad group has a "Conservative" targeting optimization.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
6789045187260792484
true
Search Help Center
true
true
true
true
true
73067
false
false