AdsApp.FrequencyCaps
Stay organized with collections
Save and categorize content based on your preferences.
FrequencyCaps provides access to each of the frequency cap.
Methods:
getEntityType()
Returns the type of this entity as a
String
, in this case,
"FrequencyCaps"
.
Return values:
Type | Description |
String |
Type of this entity: "FrequencyCaps" . |
getFrequencyCapFor(eventType, timeUnit)
Get the frequency cap for the chosen event type and time unit.
Arguments:
Name | Type | Description |
eventType |
String |
The type of event that the cap applies to. |
timeUnit |
String |
The unit of time that the cap applies to. If unspecified,
the function returns the first frequency cap applied to the event type. |
Return values:
Type | Description |
AdsApp.FrequencyCap |
The corresponding frequency cap with the event type and time unit
or null if one does not exist. |
newFrequencyCapBuilder()
Returns a new frequency cap builder for the campaign that the frequency
caps belong to. When
FrequencyCapBuilder.build()
is called, a frequency cap will be added in this campaign.
Return values:
removeFrequencyCapFor(eventType, timeUnit)
Remove the frequency cap for the chosen event type and time unit.
Returns nothing.
Arguments:
Name | Type | Description |
eventType |
String |
The type of event that the cap applies to. The value can
be either IMPRESSION or VIDEO_VIEW . |
timeUnit |
String |
The unit of time that the cap applies to. If unspecified,
the function removes all frequency caps applied to the event type. |
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 2025-08-25 UTC.
[null,null,["Last updated 2025-08-25 UTC."],[[["\u003cp\u003e\u003ccode\u003eFrequencyCaps\u003c/code\u003e allows access and management of frequency caps within Google Ads campaigns.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve, create, and remove frequency caps for specific event types (like impressions or video views) and time units (like day, week, or month).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eFrequencyCapBuilder\u003c/code\u003e helps create new frequency caps for a campaign, providing flexibility in setting limits.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetEntityType\u003c/code\u003e identifies this entity as "FrequencyCaps" for programmatic access within scripts.\u003c/p\u003e\n"]]],[],null,["# AdsApp.FrequencyCaps\n\nFrequencyCaps provides access to each of the frequency cap.\n\n### Methods:\n\n| Member | Type | Description |\n|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|\n| [getEntityType()](#getEntityType) | `String` | Returns the type of this entity as a `String`, in this case, `\"FrequencyCaps\"`. |\n| [getFrequencyCapFor(eventType, timeUnit)](#getFrequencyCapFor_eventType-timeUnit) | [AdsApp.FrequencyCap](/google-ads/scripts/docs/reference/adsapp/adsapp_frequencycap) | Get the frequency cap for the chosen event type and time unit. |\n| [newFrequencyCapBuilder()](#newFrequencyCapBuilder) | [AdsApp.FrequencyCapBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_frequencycapbuilder) | Returns a new frequency cap builder for the campaign that the frequency caps belong to. |\n| [removeFrequencyCapFor(eventType, timeUnit)](#removeFrequencyCapFor_eventType-timeUnit) | `void` | Remove the frequency cap for the chosen event type and time unit. |\n\n`getEntityType()`\n-----------------\n\nReturns the type of this entity as a `String`, in this case, `\"FrequencyCaps\"`.\n\n### Return values:\n\n| Type | Description |\n|----------|-----------------------------------------|\n| `String` | Type of this entity: `\"FrequencyCaps\"`. |\n\n`getFrequencyCapFor(eventType, timeUnit)`\n-----------------------------------------\n\nGet the frequency cap for the chosen event type and time unit.\n\n### Arguments:\n\n| Name | Type | Description |\n|-----------|----------|-----------------------------------------------------------------------------------------------------------------------------------|\n| eventType | `String` | The type of event that the cap applies to. |\n| timeUnit | `String` | The unit of time that the cap applies to. If unspecified, the function returns the first frequency cap applied to the event type. |\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|\n| [AdsApp.FrequencyCap](/google-ads/scripts/docs/reference/adsapp/adsapp_frequencycap) | The corresponding frequency cap with the event type and time unit or `null` if one does not exist. |\n\n`newFrequencyCapBuilder()`\n--------------------------\n\nReturns a new frequency cap builder for the campaign that the frequency caps belong to. When [FrequencyCapBuilder.build()](/google-ads/scripts/docs/reference/adsapp/adsapp_frequencycapbuilder#build) is called, a frequency cap will be added in this campaign.\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n| [AdsApp.FrequencyCapBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_frequencycapbuilder) | Frequency cap builder used to create a new frequency cap in the campaign. |\n\n`removeFrequencyCapFor(eventType, timeUnit)`\n--------------------------------------------\n\nRemove the frequency cap for the chosen event type and time unit.\n\nReturns nothing.\n\n### Arguments:\n\n| Name | Type | Description |\n|-----------|----------|------------------------------------------------------------------------------------------------------------------------------|\n| eventType | `String` | The type of event that the cap applies to. The value can be either `IMPRESSION` or `VIDEO_VIEW`. |\n| timeUnit | `String` | The unit of time that the cap applies to. If unspecified, the function removes all frequency caps applied to the event type. |"]]