Commit ea2f436
committed
feat(docs): add Google Analytics (GTM + GA4) to Docusaurus site
Mirrors the pattern from Couchbase-Ecosystem/cbl-ionic-docs#51:
adds googleTagManager (GTM-MVPNN2) and gtag (G-J3B5K0YX8B) plugins
inside preset-classic options. The Docusaurus plugins handle SPA
navigations correctly out of the box.
Verified locally via Chrome DevTools: gtm.js + gtag/js load on initial
page, GA4 page_view beacon fires on initial load, and a new page_view
beacon fires on client-side navigation with the updated path.1 parent b197b4c commit ea2f436
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
0 commit comments