Help Center

Integrate with Cookie Consent Management Platforms

Disclaimer

The solutions below serve as examples of how you may extend the Oracle Maxymiser tag module. Please make sure it satisfies your website’s policies, including the country-specific legislations. It also implies that you and your technical team maintains the extension going forward.

Introduction

The simplest use of Maxymiser is to identify the best performing web-page variant. I.e., this could be the variant that has the best conversion, revenue or engagement.

Maxymiser users choose an area of the page to test and set up distinct variations for this area. When the campaign goes live, experiences are served at random to different groups of visitors. This is done by manipulating the page’s original DOM. The tested area is replaced, while the other parts of the page remain intact.

It is important to avoid content flicker or excessive loading times for the Maxymiser assets. Otherwise it may distort the visitor’s perception, as well as the campaign results.

Cookie consent solution

We can suggest the following ways for integrating with external Cookie Consent solutions.

1. Switch Maxymiser on/off

Maxymiser is switched on or off after the Cookie Consent decision is available. So, when a page loads, the tag gets disabled if visitor tracking is not permitted. This can be also done by the website’s source code, i.e. implement "do not load the tag at all". Or you can tweak the tag’s extension code:

function(loader) {
  // TODO: replace window.cookiesAllowed condition
  // with your custom cookie consent flag
  if (window.cookiesAllowed !== true) {
    loader.disable();
  }
}

This option is the simplest integration. It has been implemented by Maxymiser customers as is, or alongside a page refresh on the cookie consent flag change. I.e., in the following order:

  1. Visitor agrees to cookies
  2. Page reloads
  3. Maxymiser gets activated

2. Switch Maxymiser on/off, plus forced activation

In this case Maxymiser follows the logic from option #1 but has an extra flow. Which is to re-activate the tag in case it’s been deactivated on a page. This can be handled on an event of the visitor making the cookie consent decision.

function(loader) {
  // TODO: replace the condition below with your code
  if (!/cookie_consent=1/.test(document.cookie)) {
    // disable the tag
    loader.disable();

    // enable the tag when an external condition is fulfilled
    // window.onCookiesAllowed() call to be replaced with your code
    window.onCookiesAllowed(function() {
      loader.enable();
    });
  }
}

In this context you may serve Maxymiser content without a page refresh, but some work may need to be done to minimize the risk of flickers. I.e., if visitors start viewing a page, there shouldn’t be a change to that part of it they’re interacting with.

Maxymiser customers would usually trigger this type of customization on the homepage, and any campaigns run here would be built in a way to keep change to a minimum. E.g., add a banner or recommended products block, change a carousel slide other than the first one, etc. It’s possible to make noticeable changes while the page is still behind a translucent background, that blocks the original content from visitor’s interactions.

3. Cookieless initialization followed by the cookie dropping

This solution uses the browser’s memory to store a visitor’s state. So as soon as the visitor closes a tab or leaves to another page, the state gets cleared.

The cookieless state allows Maxymiser to deliver campaigns before the cookie consent decision is made. If the tracking gets allowed during webpage browsing, the tag migrates the state data into cookies. Alternatively, if the cookies are not allowed, Maxymiser gets disabled and the state is cleared.

You can use the following code to integrate with this solution:

function(loader) {
  var consent = window.consentDecision();
  if (typeof consent === 'undefined') {
    // no decision yet
    loader.storage.assignToMemory();
  } else if (consent === false) {
    // did not agree to tracking
    loader.disable();
  }

  $(document).on('consent', function(event, decision) {
    if ( decision === true ) {
      // agrees to tracking
      loader.storage.assignToCookies();
      loader.enable();
    } else if (decision === false) {
      // changes mind, does not agree
      loader.storage.clear();
      loader.disable();
    }
  });
}

This approach may lead to an increased number of campaign generations, distributed across all experiences, so shouldn’t be of concern.

It is important to understand though that without the consent decision refreshing a page would clear the visitor’s state. Meaning that there’s a chance of content regeneration in that case.