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
  • Scroll
  • Thresholds
  • Navigation
  • Delay
  • Backdrop click
  1. SDKs
  2. Web SDK
  3. Configuration
  4. Notice

Interactions

These features are available exclusively under GDPR. However, we don’t recommend their use. Many European Data Protection Authorities, including those in France, Germany, and Belgium, along with the EDPB, do not recognise consent obtained through scrolling or clicking as clear, unambiguous, and affirmative action. Therefore, consent collected with such methods are considered invalid.

Consent can be collected on various user interactions with the website (scroll, navigation, etc.).

These options are disabled by default as, under GDPR and ePrivacy, collecting consent when the user interacts with a website (apart from an explicit Agree button), is usually not considered a valid consent. Local exceptions might apply so these options can be enabled if your legal department considers them to be valid for your operations.

Scroll

Our banner supports the option of collecting consent when the user scrolls down a page. That means that, when the user scrolls down a certain amount of the page, the banner gets closed and the user consent is registered. The banner will not be shown again on the following pages.

You can enable or disable that option with the notice.closeOnScroll option.

To enable consent on scroll:

<script type="text/javascript">
window.didomiConfig = {
  app: {
    apiKey: '<Your API key>'
  },
  notice: {
    closeOnScroll: true
  }
};
</script>

To disable consent on scroll:

<script type="text/javascript">
window.didomiConfig = {
  app: {
    apiKey: '<Your API key>'
  },
  notice: {
    closeOnScroll: false
  }
};
</script>

Thresholds

By default, consent is collected after the user scrolls more than 30% of the page. This can be configured in two ways:

  • Collect consent after the user scrolls more than X% of a page (percent-based)

  • Collect consent after the user scrolls more than X pixels on a page (absolute)

Percent-based scroll threshold

To collect consent after the user scrolls a certain percentage of the page:

<script type="text/javascript">
window.didomiConfig = {
  app: {
    apiKey: '<Your API key>'
  },
  notice: {
    closeOnScroll: true,
    closeOnScrollThresholdType: 'percent',
    closeOnScrollThreshold: 30,
  }
};
</script>

Absolute scroll threshold

To collect consent after the user scrolls a certain number of pixels on the page:

<script type="text/javascript">
window.didomiConfig = {
  app: {
    apiKey: '<Your API key>'
  },
  notice: {
    closeOnScroll: true,
    closeOnScrollThresholdType: 'absolute',
    closeOnScrollThreshold: 300,
  }
};
</script>

Navigation

Our banner supports the option of collecting consent when the user navigates to another page of your website. That means that, when the user clicks on a link to another page, the banner get closed and the user consent is registered. The banner will not be shown again on the following pages.

You can enable or disable that option with the notice.closeOnClick option.

To enable consent on navigation:

<script type="text/javascript">
window.didomiConfig = {
  app: {
    apiKey: '<Your API key>'
  },
  notice: {
    closeOnClick: true
  }
};
</script>

To disable consent on navigation:

<script type="text/javascript">
window.didomiConfig = {
  app: {
    apiKey: '<Your API key>'
  },
  notice: {
    closeOnClick: false
  }
};
</script>

Delay

This option allows you to set a delay that will be applied when consent is collected after the user navigates to another page of your website. That delay will allow your vendors to execute on the first page before the user is redirected to the page he was meant to navigate to. It helps not losing data that would only be available on the first page that the user gets on (for analytics and attribution, for instance).

With this option, the chain of events becomes:

  1. User clicks on a link to navigate to another page of your website

  2. Consent is collected

  3. Vendors' tags are fired on the page

  4. Delay of X milliseconds

  5. User navigates to the other page

If the user has already given consent by another mean, no delay will be applied.

To enable this option, set your delay in milliseconds in the notice.closeOnClickNavigationDelay property:

<script type="text/javascript">
window.didomiConfig = {
  app: {
    apiKey: '<Your API key>'
  },
  notice: {
    closeOnClick: true,
    closeOnClickNavigationDelay: 500 // Delay of 500 milliseconds
  }
};
</script>

This option is disabled by default and no delay is applied.

Backdrop click

Our banner supports the option of collecting consent when the user clicks on the backdrop when the popup notice is open. By default, this option is disabled but you can enable it with the notice.closeOnClickBackdrop option.

This feature only applies to the "popup" notice.

<script type="text/javascript">
window.didomiConfig = {
  app: {
    apiKey: '<Your API key>'
  },
  notice: {
    closeOnClickBackdrop: true
  }
};
</script>
PreviousBehaviorNextLook and feel

Last updated 1 year ago