Skip to content

clearFrequencyCapHistory

Clear stored frequency-cap histories. Clearing state does not automatically request another ad.

const htag = window.htag.api('1');
htag.clearFrequencyCapHistory({ capIds: ['interstitial'] });
htag.refreshAds({ elementIds: ['interstitial-slot'] });

Call without arguments to clear every currently configured cap:

window.htag.api('1').clearFrequencyCapHistory();
  • options.capIds (optional): Cap IDs to clear. If omitted, all configured cap histories are cleared.

Returns the Htag API object, allowing for method chaining.