If you plan to use any of the following analytics tools, please refer to the codes provided in the document for proper setup.

Important Note

The <noscript> tags must be removed because the Kanamé cookie banner is a JavaScript-based solution. <noscript> is designed for browsers that do not support JavaScript, and including it may unintentionally set cookies without user consent.

When integrating marketing tools with the cookie consent banner, you can check which cookie categories users have consented to. Follow the provided implementation guide for popular marketing tools.

Implementation Note:

The code below should replace your existing Meta Pixel, Google Tag Manager (GTM), or Google Analytics (GA) tracking codes. Insert it in the page header code or head tracking code settings for funnels, websites, or webinars. This template ensures proper integration with the cookie consent banner.

Facebook pixel

Google Analytics

Google Tag Manager

The below code is optional if you wish to read consent or categories user has accepted for other custom code or third party javascript

// Helper function to get consented categories function getConsentedCategories() { const categoriesCookie = document.cookie .split(’; ’) .find(row => row.startsWith(‘cookie-categories=’));

if (categoriesCookie) { // Convert cookie value to array return categoriesCookie.split(’=’)[1].split(’,’); } return []; }

// Helper function to check if category is allowed function isCategoryAllowed(category) { const categories = getConsentedCategories(); return categories.includes(category); }

// Helper function to get cookie config function getCookieConfig() { const cookieConfig = document.cookie .split(’; ’) .find(row => row.startsWith(‘cookie-config=’));

if (cookieConfig) { return cookieConfig.split(’=’)[1]; // Returns: all, essential, or custom } return undefined; // Return undefined if user hasn’t made a choice yet }

Important Notes:

  1. The cookie categories are stored in the cookie-categories cookie
  2. Categories are comma-separated (e.g., “essential,advertising,analytics”)
  3. Always check for initial consent when loading your marketing tools
  4. Listen for consent change events to update tool settings
  5. Remove any  tags as they may bypass consent checks

Was this article helpful?