This project is not covered by Drupal’s security advisory policy.

This module is very specific and work in progress. Do NOT use in production!

Provides anonymize callbacks for Dynamics 365 Forms with COOKiES Consent Management Cookie Banner as described in How to disable non-essential Dynamics 365 Marketing cookies:

This module does not add, handle or block any MS Dynamics 365 Form Code snippets. Neither it blocks the MS Dynamics 365 Marketing Scripts or Forms or Cookies. Its only focus is to set / remove the "anonymize" flag as documented.

Functionality

This module neither adds the MS Dynamics 365 Marketing Forms code to the project,
nor it provides functionality to handle the codes.

It simply adds the "anonymize: true" / "anonymize: false" flag JS Snippet from
https://docs.microsoft.com/en-us/dynamics365/marketing/cookies#how-to-disable-non-essential-dynamics-365-marketing-cookies
based on the consent decision.

  • If conset IS NOT given (default), it adds "anonymize: true".
  • If consent IS given, it adds "anonymize: false".

Technically spoken:

If consent is not given, places

<script>
    function d365mktConfigureTracking() {
         return {Anonymize: true};
    }
</script>

globally.

If consent is given, calls

MsCrmMkt.reconfigureTracking({Anonymize: false})

How to use

  • Enable and configure COOKiES module and this module.
  • Add the MS Dynamics 365 Marketing Forms to your page like before.
  • Ensure the anonymization is added to every page and is working as expected!

How to test

Call d365mktConfigureTracking(); in your browser console with and without cookie consent to check if anonymize: "true" or "false" is returned. If the function is not defined, something is broken.

Supporting organizations: 
proudly developed this module for the community

Project information

Releases