ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

Web banners: instructions for developers

General

The evaluation of conditions for displaying banners and the insertion of the banner into the page (if any) happens during the MeiroEvents.track(“pageview”) function call.

If your website is a single-page application and you call this function manually, and if there are any cookie/local storage/GTM conditions, make sure that the relevant cookies etc. are set before this tracking call.

The element containing the banner has a z-index value set to 1000000 (1 million). This includes the overlay (for banners with position set to “middle”).

 

HTML banners

The HTML banners are inserted into an iframe element. This means that the CSS from the main page is inaccessible within the banner, and vice versa.

If you want to access the window object of the main page from within the banner HTML code, you can access it under window.parent.

In particular, you can track events through the Meiro Events SDK with window.parent.MeiroEvents.track(...), and if you’re implementing your own close button for the banner, you can close the banner by calling window.parent.MeiroEvents.closeWebBanner().

 
Cookie, local storage, and Google Tag Manager data type handling

The values retrieved from cookies/storage/GTM are handled in the following way for the purposes of condition evaluation:

Boolean

The operators are “yes” and “no”.

  • For “yes”, the condition will pass if the value is true, 1, or any of the strings “true”, “True”, or “1”. Similarly,
  • for
  • For “no”, the condition will pass if the value is false, 0, “false”, “False”, or “0”.
Datetim

The value is passed as an argument to the JavaScript Date class constructor before comparing it with the provided value. If the result of the conversion is an invalid date, the condition will always fail.

Number The value is converted to the JavaScript number type before comparison.
String The value is converted to the JavaScript string type before comparison.