Cookie Consent Manager

Opt-out model · GPC · Consent Mode v2 · Meta Pixel

Standard (bottom-right)

Default banner in the bottom-right corner.

https://your-domain.com/cookie-consent.js
Left-side (chat-friendly)

Same features, bottom-left — avoids live chat widgets on the right.

https://your-domain.com/cookie-consent-left.js

Client options

Banner position

Live tester

Signals sent to Google / Meta / dataLayer appear here…

Embed snippet

Paste into the client site's header (WPCode, theme header, or a GTM Custom HTML tag).

<!-- Agency Cookie Consent -->
<script>
  window.TMD_CONSENT_CONFIG = {
    companyName: 'Acme Dental',
    privacyUrl: 'https://tmdmktg.com/privacy-policy/',
    position: 'bottom-right',
    buttonColor: '#2563eb',
    themeColor: '#111827'
  };
</script>
<script src="https://your-domain.com/cookie-consent.js" defer></script>

WordPress header/footer

  1. Install WPCode (Insert Headers and Footers).
  2. Code Snippets → Header & Footer → paste the embed snippet into Header.
  3. Or add it in functions.php:
add_action('wp_head', function () { ?>
<!-- Agency Cookie Consent -->
<script>
  window.TMD_CONSENT_CONFIG = {
    companyName: 'Acme Dental',
    privacyUrl: 'https://tmdmktg.com/privacy-policy/',
    position: 'bottom-right',
    buttonColor: '#2563eb',
    themeColor: '#111827'
  };
</script>
<script src="https://your-domain.com/cookie-consent.js" defer></script>
<?php }, 1);

Footer reopen button

Any element with this attribute reopens the banner.

<a href="#" data-open-cookie-settings>Cookie Preferences</a>

<!-- or via JS -->
<button onclick="openCookieSettings()">Cookie Settings</button>

Google Tag Manager setup

  1. Create a Custom HTML tag with the embed snippet, firing on Consent Initialization – All Pages.
  2. Create a Custom Event trigger named cookie_consent_update.
  3. Add Data Layer Variable consent_status (values: accepted / opted_out).
  4. Ad tags (Google Ads, Meta) respect Consent Mode automatically; for others add an exception trigger where consent_status equals opted_out.
// dataLayer event pushed on load and on every choice
{
  event: 'cookie_consent_update',
  consent_status: 'opted_out',
  ad_storage: 'denied',
  ad_user_data: 'denied',
  ad_personalization: 'denied',
  analytics_storage: 'granted'
}

// Listen in custom code
window.addEventListener('tmd_consent_change', e => console.log(e.detail.status));