All pluginsBusiness

Analytics & consent

Experimental

Google Tag Manager set up in the admin, with a consent banner for PDPA and GDPR and GA4 events.

@easy-cms/plugin-analytics770 downloads in total770 downloads last week

What it does

  • Tag Manager container set in the admin, no deploy
  • Consent Mode v2: denied until the visitor chooses
  • A banner in English and Thai, Accept and Reject side by side
  • Consent records without IP addresses
  • GA4 events from forms and the shop, and purchases sent by the server when the money arrives

Install

$npm install @easy-cms/plugin-analytics

In easy-cms.config.ts

easy-cms.config.ts
import { defineConfig } from '@easy-cms/core'
import { analyticsPlugin } from '@easy-cms/plugin-analytics'

export default defineConfig({
  // …
  plugins: [analyticsPlugin({ defaults: { gtm: process.env.GTM_ID } })],
})
Downloads, last 30 days · 770

From npm. Counts include automated installs, such as CI.