c15t
/
C15T Logo
Frameworks
Welcome to c15t Docs
Introduction to Consent Management (c15t)
AI Tools Integrations
OSS
Contributing to c15t.com
License
Building Privacy Tools in the Open
Legal
Cookie Policy
Privacy Policy
C15T Logo
HomeFrontendIntegrationsSelf HostChangelog
xbskydiscordgithub1.4k
c15t
/
C15T Logo
Frameworks
Welcome to c15t Docs
Introduction to Consent Management (c15t)
AI Tools Integrations
OSS
Contributing to c15t.com
License
Building Privacy Tools in the Open
Legal
Cookie Policy
Privacy Policy
home-2Docs
chevron-rightIntegrations
chevron-rightGoogle-tag

GA4 + Google Ads (gtag.js)

Send data to Google Analytics 4 and Google Ads with automatic Consent Mode v2 support.

Google Tag (gtag.js) is Google's unified tracking script for sending data to Google Analytics 4 (GA4), Google Ads, and Floodlight. It measures user behavior, tracks conversions, and powers Google's advertising ecosystem.

c15t initializes Google Tag with Consent Mode v2 defaults set to denied and automatically updates the consent state when users make choices. You don't need to configure Google Consent Mode yourself.

Choosing the right category:

  • Use category: 'measurement' for analytics-only tracking (GA4 events)
  • Use category: 'marketing' for advertising and conversion tracking (Google Ads)

Adding GA4 + Google Ads to c15t

import { configureConsentManager } from 'c15t';
import { gtag } from '@c15t/scripts/google-tag';

configureConsentManager({
  scripts: [
    gtag({
      id: 'G-XXXXXXXXXX',
      category: 'measurement', // or 'marketing'
    }),
  ],
});

Types

GtagOptions

Property
Types

Script

Property
Types
C15T Logo
Leverage native React components for seamless integration and high performance in a robust Consent Management solution that empowers your development team while prioritizing privacy and compliance.
Product
  • Documentation
  • Components
Company
  • GitHub
  • Contact
Legal
  • Privacy Policy
  • Cookie Policy
c15t