Regional cookie consent banners on website

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815

Implementation of Regional Cookie Consent Banners

GDPR requires explicit consent for non-essential cookies from EU users. CCPA requires providing option to opt-out from data sale. For users from Russia and CIS — notification per 152-FL. Single banner for all doesn't work — need regional logic.

Banner Display Logic

interface ConsentState {
  analytics:   boolean;
  marketing:   boolean;
  preferences: boolean;
}

class CookieConsentManager {
  private jurisdiction: 'gdpr' | 'ccpa' | 'ru' | 'none';

  init(userCountry: string): void {
    this.jurisdiction = this.detectJurisdiction(userCountry);

    const saved = this.getSavedConsent();

    if (!saved || this.isOutdated(saved)) {
      this.showBanner();
    } else {
      this.applyConsent(saved.state);
    }
  }

  private detectJurisdiction(country: string): 'gdpr' | 'ccpa' | 'ru' | 'none' {
    if (EU_COUNTRIES.includes(country)) return 'gdpr';
    if (country === 'US')               return 'ccpa';
    if (country === 'RU')               return 'ru';
    return 'none';
  }

  accept(categories: ConsentState): void {
    const consent = {
      state:    categories,
      version:  CONSENT_VERSION,
      date:     new Date().toISOString(),
      country:  this.userCountry,
    };
    localStorage.setItem('cookie_consent', JSON.stringify(consent));
    this.applyConsent(categories);
    this.hideBanner();
    this.sendConsentEvent(consent);
  }
}

Banner Components by Region

GDPR (EU) — category selection mandatory:

function GdprBanner({ onAccept, onCustomize, onDecline }) {
  return (
    <div className="cookie-banner">
      <p>We use cookies for analytics and marketing...</p>
      <div className="flex gap-2">
        <button onClick={() => onAccept({ analytics: true, marketing: true, preferences: true })}>
          Accept All
        </button>
        <button onClick={onCustomize}>Customize</button>
        <button onClick={() => onDecline()}>Only Essential</button>
      </div>
    </div>
  );
}

CCPA (USA) — right to opt-out from data sale:

function CcpaBanner({ onOptOut }) {
  return (
    <div className="cookie-banner ccpa">
      <p>We do not sell your data. <a href="/privacy">Privacy Policy</a></p>
      <button onClick={onOptOut}>Do Not Sell My Personal Information</button>
    </div>
  );
}

Russia (152-FL) — informational notification:

function RuBanner({ onAccept }) {
  return (
    <div className="cookie-banner minimal">
      <p>We use cookies for proper site operation. <a href="/privacy">More</a></p>
      <button onClick={onAccept}>Got it</button>
    </div>
  );
}

Google Tag Manager Integration

After getting consent, activate tags in Google Tag Manager:

function applyConsent(state: ConsentState): void {
  // Google Consent Mode v2
  window.gtag('consent', 'update', {
    analytics_storage:  state.analytics ? 'granted' : 'denied',
    ad_storage:         state.marketing ? 'granted' : 'denied',
    ad_user_data:       state.marketing ? 'granted' : 'denied',
    ad_personalization: state.marketing ? 'granted' : 'denied',
  });

  // Wait for consent before loading marketing scripts
  if (state.marketing) {
    loadScript('https://www.googletagmanager.com/gtag/js?id=G-XXXX');
  }
}

Timeline

Regional banners with GDPR/CCPA/RU logic and Google Consent Mode integration: 3–5 business days.