mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
feat(analytics): add automatic CTA tracking to all 10 landing pages
Create Analytics.astro component in @manacore/shared-landing-ui that automatically tracks CTA clicks and pricing section views via Umami. The component uses event delegation and auto-detection of section context (hero/pricing/footer) from section IDs or DOM position, requiring zero changes to existing landing page content. Tracked events: cta_click (with location), pricing_viewed, pricing_plan_selected (with plan name) Added to all 10 landing page Layout.astro files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
420926aef1
commit
287bbed86e
12 changed files with 155 additions and 0 deletions
|
|
@ -88,6 +88,27 @@ Diese Events erfordern **keinen Code in den einzelnen Apps** — sie werden auto
|
|||
|
||||
---
|
||||
|
||||
## Landing Page Event Tracking
|
||||
|
||||
Alle Landing Pages binden `<Analytics />` aus `@manacore/shared-landing-ui` ein. Das Script trackt automatisch:
|
||||
|
||||
| Event | Wann | Data |
|
||||
|-------|------|------|
|
||||
| `cta_click` | Klick auf CTA-Button/Link | `{ location: 'hero' \| 'pricing' \| 'footer' \| ... }` |
|
||||
| `pricing_viewed` | Pricing-Section wird sichtbar | - |
|
||||
| `pricing_plan_selected` | Klick auf Pricing-Plan CTA | `{ plan: 'free' \| 'pro' \| ... }` |
|
||||
|
||||
**Auto-Detection:** Das Script erkennt die Section automatisch aus `id`-Attributen oder der Position im DOM (erster/letzter Abschnitt).
|
||||
|
||||
**Explizite Attribute (optional):**
|
||||
```html
|
||||
<a href="/register" data-track-cta="hero">Jetzt starten</a>
|
||||
<a href="/pro" data-track-cta="pricing" data-track-pricing="pro">Pro starten</a>
|
||||
<section data-track-section="pricing">...</section>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Custom Event Tracking
|
||||
|
||||
### Installation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue