# Google Analytics

> How to approach a Google Analytics integration in this repo.

*Canonical: https://makerkit.dev/docs/tanstack-drizzle/analytics/google-analytics-provider*

---

This repository does not currently ship a Google Analytics provider package or a prewired GA4 integration.

## Current State

- No `@kit/google-analytics` package is present in `packages/`
- `@kit/analytics` currently registers only the `null` provider
- There is no checked-in GA4 codemod or plugin wiring in this repo

## What To Do Instead

If you want Google Analytics in this codebase:

1. Create a provider that implements `AnalyticsService`
2. Register it in `packages/analytics/src/index.ts`
3. Add any browser script/bootstrap logic inside that provider
4. Mirror the setup in `packages/analytics/src/server.ts` only if you also need server-side forwarding

Use [Custom Analytics Provider](./custom-analytics-provider) as the reference pattern.

## Recommended Scope

Google Analytics is a good fit when you need:

- marketing attribution
- ad campaign reporting
- basic page-view and conversion tracking

If you need a production-ready integration, plan to own the package, env vars, consent handling, and any GA-specific event mapping yourself.
