Select platform: [HTML5](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/html5/limited-ads "View this page for the HTML5 platform docs.") [Android](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/android/limited-ads "View this page for the Android platform docs.") [iOS](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/limited-ads "View this page for the iOS platform docs.")

<br />

As of January 14th 2021, the IMA HTML5 SDK
allows [limited ads](https://support.google.com/admanager/answer/9882911) to be served
when the user does not give consent to cookies, the user denies consent to
cookies, or when IMA does not receive a valid TC string in GDPR and ePrivacy
regions following the grace period of IAB TCFv2 integration.
For DAI SDKs you must set the [`ltd`](https://support.google.com/admanager/answer/7320899#ltd) parameter using [`StreamRequest.adTagParameters`](https://developers.google.com/interactive-media-ads/docs/sdks/html5/dai/reference/js/StreamRequest#adTagParameters) . Please see this [Limited ads guide](https://support.google.com/admanager/answer/9882911) for more information.

<br />

Publishers using Google Publisher Tag (GPT) will need to also set [PrivacySettingsConfig.limitedAds](https://developers.google.com/publisher-tag/reference#boolean-limitedads) to disable GPT-related cookies. The following code snippet shows how to do this based on [IMA's companion ads guide](https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/companions):

<br />

```
...

<!-- Register your companion slots -->
<script type='text/javascript'>
  googletag.cmd.push(function() {
    googletag.pubads().setPrivacySettings({
      limitedAds: true,
    });
    // Supply YOUR_NETWORK and YOUR_UNIT_PATH.
    googletag.defineSlot('/YOUR_NETWORK/YOUR_UNIT_PATH', [728, 90], 'companionDiv')
      .addService(googletag.companionAds())
      .addService(googletag.pubads());
    googletag.companionAds().setRefreshUnfilledSlots(true);
    googletag.pubads().enableVideoAds();
    googletag.enableServices();
  });
</script>

...
```
Publishers are still responsible for playback of the stream manifest. The manifest URL continues to point to dai.google.com which is a cookied domain and may carry cookies. Because of this, the player needs to be configured to correctly request the manifest `withCredentials=false`.

<br />

Please see the following links to set this for your specific player:

- [hls.js](https://github.com/video-dev/hls.js/blob/master/docs/API.md#xhrsetup)
- [JW Player](https://developer.jwplayer.com/jwplayer/docs/jw8-player-configuration-reference#section-advertising) (scroll for `withCredentials` property)
- [Shaka Player](https://github.com/google/shaka-player/blob/master/docs/tutorials/ad_monetization.md#disabling-cookies-for-serving-limited-ads)

It is also possible to enable limited ads automatically through integrating with
a Consent Management Platform (CMP). This is supported on

the latest version of the HTML5 SDK as of January 14th 2021.