# Oktavia Analytics Events

Canonical URL: https://oktavia.app/docs/oktavia-analytics-events.md

## Purpose

This document defines the first public-funnel analytics taxonomy for Oktavia.

The goal is to measure acquisition and conversion before paid media spend. Events must describe real user intent and must be stable enough for dashboards, ads optimization and agency reporting.

## Technical Layer

The frontend exposes an internal analytics layer that can send events to:

- `window.dataLayer`,
- Google Tag Manager when `OKTAVIA_GTM_ID` is configured,
- Google Analytics when `OKTAVIA_GA_MEASUREMENT_ID` is configured.

Runtime variables:

- `OKTAVIA_GTM_ID`
- `OKTAVIA_GA_MEASUREMENT_ID`
- `OKTAVIA_ANALYTICS_DEBUG`

The same values can also be supplied as:

- `NG_APP_GTM_ID`
- `NG_APP_GA_MEASUREMENT_ID`
- `NG_APP_ANALYTICS_DEBUG`

## Base Properties

Every event includes:

- `event_source`: always `oktavia_web`.

Page view events include:

- `page_path`
- `page_location`
- `page_title`

CTA events include:

- `cta_label`
- `cta_location`
- `cta_target`

## Events

### `page_view`

Triggered when the Angular route changes.

Used for:

- traffic reporting,
- conversion rate by route,
- retargeting audiences,
- landing page performance.

### `pricing_view`

Triggered when `/pricing` is viewed.

Used for:

- pricing intent,
- campaign quality,
- pricing page conversion rate.

### `onboarding_view`

Triggered when `/onboarding` is viewed.

Used for:

- onboarding service interest,
- implementation intent.

### `product_page_view`

Triggered when an indexed product page under `/producto/*` is viewed.

Used for:

- product-module intent,
- SEO page performance,
- retargeting by feature interest,
- comparing product demand before paid media.

Current routes:

- `/producto/planificacion-horaria`
- `/producto/control-horario`
- `/producto/documentacion-laboral`
- `/producto/ausencias-y-cambios`
- `/producto/cumplimiento-laboral`
- `/producto/portal-trabajador`

### `segment_page_view`

Triggered when an indexed segment page under `/hosteleria/*` is viewed.

Used for:

- audience/ICP intent,
- vertical landing performance,
- MQL qualification signals,
- deciding which segment deserves paid campaigns or lead magnets.

Current routes:

- `/hosteleria/restaurantes`
- `/hosteleria/grupos-restauracion`
- `/hosteleria/gestorias-laborales`
- `/hosteleria/multisede`

### `comparison_page_view`

Triggered when an indexed comparison page under `/comparativas/*` is viewed.

Used for:

- problem-aware demand,
- visitors comparing current tools with Oktavia,
- sales enablement content performance,
- deciding which objections deserve landing pages or lead magnets.

Current routes:

- `/comparativas/excel-vs-oktavia`
- `/comparativas/whatsapp-vs-oktavia`
- `/comparativas/software-rrhh-generico-vs-oktavia`

### `connect_docs_viewed`

Triggered when `/developers/connect` is viewed.

Used for:

- developer/integration interest,
- partner funnel.

### `status_view`

Triggered when `/status` is viewed.

Used for:

- trust/status page usage.

### `cta_clicked`

Triggered by public CTAs that are not already a stronger semantic event.

Properties:

- `cta_label`
- `cta_location`
- `cta_target`

### `trial_requested`

Triggered when a public CTA points to the registration/trial flow.

Used for:

- main conversion intent,
- campaign optimization,
- funnel reporting.

### `demo_login_clicked`

Triggered when a user clicks demo/login-oriented CTAs.

Used for:

- demo interest,
- low-friction evaluation intent.

### `onboarding_plan_selected`

Triggered when a user selects onboarding-related CTAs.

Used for:

- onboarding commercial intent,
- service interest.

### `register_started`

Triggered when the registration form is submitted or when local validation blocks submission.

Recommended properties:

- `result`
- `reason`
- `has_company_name`
- `has_email`

### `register_completed`

Triggered when registration succeeds, requires confirmation or fails.

Recommended properties:

- `result`
- `user_role`

### `login_submitted`

Triggered when login is submitted and when it succeeds or fails.

Recommended properties:

- `result`
- `user_role`
- `local_demo_visible`

## Next Events

Future events to add:

- `lead_magnet_downloaded`
- `contact_form_submitted`
- `demo_booked`
- `pricing_calculator_used`
- `onboarding_file_uploaded`
- `connect_sandbox_event_sent`
- `developer_asset_downloaded`

## Governance

Do not add one-off event names directly inside page components without adding them here.

Use stable event names and descriptive properties. Avoid sending personal data, emails, company names or free-text notes to analytics providers.

