Didomi - Developers documentation
  • Introduction
  • SDKs
    • Introduction
    • Web SDK
      • Getting started
      • Tags and vendors management
        • Tags management
          • Events & Variables
            • Deprecated
            • Custom events
          • Tag managers
            • Adobe Launch/DTM
            • Eulerian
            • Google Tag Manager
              • Configure the Didomi / GTM integration
              • Didomi's GTM template
            • Tealium
            • Other tag managers
        • Custom Didomi <script> tags
        • Third-party integrations
          • Google Ad Manager / AdSense
            • GDPR via Non-Personalized Ads
              • Share consent and load/refresh ads
              • Share consent without loading or refreshing ads
            • US states laws
          • Google Consent Mode V2
          • Kameleoon
          • Piano Analytics (AT Internet)
          • Prebid
            • GDPR via IAB TCF
            • US states laws
          • Salesforce DMP (Krux)
        • IAB frameworks
        • Programmatic API
      • Configuration
        • Bots (SEO & Performance tools)
        • Configuration by URL
        • Cookies and storage
        • Custom domains for events
        • Notice
          • Behavior
          • Interactions
          • Look and feel
        • Preferences
        • Theme
      • AB tests
      • Custom domain
        • Domain delegation
        • Reverse proxy
      • Share consents between domains
      • Share consents across devices
      • Pass user choices in query string
      • Serve Didomi assets from your domain
      • Reference
        • API
          • Deprecated
        • Events
      • Performance
      • Versions
    • Mobile and TV SDKs
      • Android and Android TV
        • Setup
        • Logging
        • Reference
          • API
            • Deprecated
          • Events
        • Versions
      • iOS and tvOS
        • Setup
        • Logging
        • App Tracking Transparency (iOS 14.5+)
        • Reference
          • API
            • Deprecated
          • Events
        • Versions
      • Unity
        • Setup
        • Reference
        • Versions
        • Troubleshooting
      • React Native
        • Setup
        • Reference
          • Deprecated
        • Versions
      • Flutter
        • Setup
        • Reference
        • Versions
      • Consent notice
        • Getting started
        • Customize the notice
        • Customize the preferences popup
        • Customize the theme & UI
        • Load notice by ID
      • Third-party SDKs
      • Share consents across devices
      • Share consent with WebViews
      • Google Consent Mode v2
      • FAQ
    • AMP SDK
      • Blocking Behaviors
        • Load immediately on page load
        • Load only after consent (positive or negative)
        • Load only after positive consent
      • Consent status for vendors
    • Help & Support
  • API
    • Introduction
      • Authentication
      • Errors
      • Pagination
      • Filters
      • Caching
      • Rate limiting
      • Quotas
      • Translations
    • Data Manager
      • Regulations
      • Configuration Tree
      • Purposes
        • Purposes & Vendors Numerical IDs
      • Preferences Library
      • User Rights
    • Widgets
      • Consent notices
        • Notices
        • Configurations
        • Multi-Regulation Configurations
          • Migration of Existing Notices and API Updates
        • Deployments
        • Tutorials
          • Create and publish a consent notice
          • Create and publish a multi-regulation consent notice
      • Privacy widgets
        • Create a widget
        • Retrieve widgets
        • Edit a widget
          • Content & Design
            • Themes & Shapes
            • Components
              • auth
              • dsar_form
              • footer
              • header
              • preference
              • preference_value
              • save
              • section
              • sections
            • Options
          • Purposes & preferences
          • Settings
        • Deploy a Widget
          • Use your own subdomain
          • Use your own domain
          • Implement an embeddable widget on your website
        • Authentication
          • Manage authentication providers
          • Authenticate your end-user
        • Archive a widget
        • Headless widgets
          • Public Methods
          • Custom elements
          • Custom events
          • Event listeners
        • Tutorial
          • Launch a Preference Center from a mobile app
    • Compliance Reports
      • Properties
      • Reports
      • CSV format reference
      • Websites
    • Consents and Preferences
      • Events
        • Generate IAB TCF consent string
      • Links
      • Proofs
      • Tokens
      • Secrets
      • Users
      • Tutorial
        • Collect and operate data
    • Privacy Requests
      • Requests
      • Notes
      • Links
      • Emails
  • Integrations
    • Introduction
      • Quotas
    • Generic integrations
      • Batch export
        • Destinations
          • AWS S3 Bucket (owned by Didomi)
          • GCP Storage Bucket
        • Exported data
          • Notices consents
        • Logs
      • Webhooks
      • Batch import
      • Analytics export
        • Destinations
          • AWS S3 Bucket (owned by Didomi)
          • GCP Storage Bucket
    • Third-party apps
      • CMP integrations
        • Didomi-mParticle integration for your CMP
        • Deploy Didomi’s SDK for your Adobe Commerce website
      • Preference Management Platform integrations
        • Actito
        • Adobe Campaign Classic
        • Adobe Experience Cloud
        • Adobe Marketo Engage
        • Adobe Source Connector
        • Braze
        • Dotdigital
        • Hubspot
        • Mailchimp
        • Microsoft Dynamics 365
        • Salesforce Marketing Cloud
        • Salesforce Sales & Service Cloud
        • Selligent
        • Brevo (ex Sendinblue)
    • Tutorials
      • Configure a HTTP webhook
      • Configure a batch export
      • Configure an analytics export
    • Emailing
      • Configurations
        • Actito Email
        • Actito SMS
        • Adobe Campaign Classic
        • Adobe Campaign Standard
      • Emails
        • Templates
        • Manage your templates
Powered by GitBook
On this page
  • Vendors that block the tag by default
  • Vendors
  • Policy config
  • Summary
  • Vendors sharing consent but do not block the tag by default (Ex: amp-ad with DoubleClick)
  • Vendors
  • Send RTC call regardless of consent state
  • Policy config
  • Summary
  • Other tags/vendors
  • Summary
  1. SDKs
  2. AMP SDK
  3. Blocking Behaviors

Load immediately on page load

PreviousBlocking BehaviorsNextLoad only after consent (positive or negative)

Last updated 2 years ago

In this scenario, tags are loaded immediately on page load. If the user consent status is available because the user has already given consent through the CMP, the user consent status is passed to the tag. If the user consent status is not available yet (the CMP is still displayed), the tag is loaded with the consent status "unknown".

Tags and vendors are split into three categories:

The behavior varies depending on the type of tags and vendors. Please contact your vendors if the behavior you are looking for is not the one that you observe.

Vendors that block the tag by default

Some vendors are automatically collecting the user consent status from AMP. By default, the tag from those vendors will wait for a response from the user to the CMP before executing on the page.

Those tags do not need a data-block-on-consent attribute but will require a on the amp-consent tag to be loaded on page load irrespective of the consent status.

comScore with an amp-analytics tag is an example of such tag:

<amp-analytics type="comscore">
  <script type="application/json">{ "vars": { "c2": "1234"}} </script>
</amp-analytics>

...

<amp-consent layout="nodisplay" id="didomi" type="didomi">
  <script type="application/json">
    {
      "clientConfig": {...},
      "policy": {
        "default": {
          "waitFor": {
            "didomi": []
          },
          "timeout": {
            "seconds": 0, // Tell AMP to load the tag immediately
            "fallbackAction": "reject" // Reject OR dismiss
          }
        }
      }
    }
  </script>
  ...
</amp-consent>

Vendors

There is no clear list of vendors that automatically collect the user consent status from AMP. They can usually be identified through their AMP configuration by checking if they reference the consentState parameter.

List of vendors and their configurations:

Policy config

When adding a policy config, the analytics will be sent with a consent status:

  • unknown if the fallbackAction is dismiss (default configuration)

  • insufficient if the fallbackAction is reject

Some advertising providers will not display non-personalized ads if the consent status is unknown. Hence, we recommend to set the fallbackAction to reject to display non-personalized ads or send analytics before consent is given. Consent from the fallback action is not persisted in the local storage and only applies to the current page.

Once the consent state has been updated, the status will change on the next page load.

Note the didomi ID in the waitFor object. This is the consent ID and should not be changed.

Summary

Configuration

When is the tag loaded

Default (no policy config)

Tag is loaded after the user gives consent with the consent status from the user choices.

Policy config

Tag is loaded immediately on page load with an unknown consent status until the user makes a choice.

Vendors sharing consent but do not block the tag by default (Ex: amp-ad with DoubleClick)

If you want to link the consent to your tag but still be able to load it immediately on page load, you will have to follow those 2 steps:

  • Add a custom policy object on the amp-consent tag.

One common use case is adding a timeout after which the consent will be either dismissed or rejected so non-personalized ads will be displayed before any interaction from the user.

Example of amp-ad with the type DoubleClick and a RTC Config with APS.

<amp-ad 
  data-block-on-consent
  width="300"
  height="200"
  type="doubleclick"
  data-slot="/1234"
  rtc-config='{
    "vendors": {
        "aps": {
          "sendRegardlessOfConsentState": true // Always send the consent regardless of the state
        }
      }
    }'>
  </amp-ad>

...

<amp-consent layout="nodisplay" id="didomi" type="didomi">
  <script type="application/json">
    {
      "clientConfig": {...},
      "policy": {
        "default": {
          "waitFor": {
            "didomi": []
          },
          "timeout": {
            "seconds": 0, // load immediately
            "fallbackAction": "reject" // reject OR dismiss
          }
        }
      }
    }
  </script>
  ...
</amp-consent>

Vendors

Vendors on amp-ad are not able to share consents. However, with the use of RTC configuration, some vendors are able to pass some information to their requests. There is no clear list of vendors that are able to collect the user consent string/status from AMP with the RTC configuration. They can usually be identified through their AMP configuration by checking if they reference the CONSENT_STRING and/or CONSENT_STATE parameters.

List of vendors supporting RTC configuration and their configurations:

Send RTC call regardless of consent state

This option allows you to send the bid requests of the vendors present in the RTC configuration regardless of the consent state (accept/reject/dismiss). By default, the bid request is only sent if the user accept the consent.

Policy config

When adding a policy config, the analytics/bid request will be sent with a consent status:

  • unknown if the fallbackAction is dismiss (default configuration)

  • insufficient if the fallbackAction is reject

Some advertising providers will not display non-personalized ads if the consent status is unknown. Hence, we recommend to set the fallbackAction to reject to display non-personalized ads before consent is given. Consent from the fallback action is not persisted in the local storage and only applies to the current page.

Once the consent state has been updated, the status will change on the next page load.

Note the didomi ID in the waitFor object. This is the consent ID and should not be changed.

Summary

Configuration

When is the tag loaded

Default (no policy config)

Tag is loaded after the user gives consent with the consent status from the user choices.

Policy config

Tag is loaded immediately on page load with an unknown consent status until the user makes a choice.

Other tags/vendors

Some tags/vendors are not able to load or send requests on page load without any consent being previously given if they are blocked by a data-block-on-consent.

A common case can be the unavailability for a vendor present on an amp-ad to display non-personalized ads if the consent status is unknown. In that case, there is no current solution to load the tag on page load except removing the data-block-on-consent attribute.

Summary

Configuration

When is the tag loaded

Default (no data-block-on-consent)

Tag is loaded on page load.

With data-block-on-consent

Tag is loaded once a positive consent is given.

With data-block-on-consent="_till_responded"

Tag is loaded once a consent (positive or negative) is given.

A policy config can be added to the amp-consent element's JSON configuration object to customize consent blocking behaviors. For more information concerning the custom policy, you can visit the .

Block the tag either or by adding a data-block-on-consent to the tag itself.

You can find more information on the .

A policy config can be added to the amp-consent element's JSON configuration object to customize consent blocking behaviors. For more information concerning the custom policy, you can visit the .

For more information concerning the custom policy, you can visit the .

Analytics
AMP documentation
Ads
AMP documentation
AMP documentation
AMP documentation
custom policy object
Vendors supporting amp-consent and blocking the tag by default
Vendors supporting amp-consent without blocking the tag by default
Other tags/vendors
with the meta tag amp-consent-blocking