-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathevents.ts
More file actions
64 lines (55 loc) · 2.19 KB
/
Copy pathevents.ts
File metadata and controls
64 lines (55 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
* Canonical analytics event taxonomy — the single source of truth for event
* NAMES across the site. Client code emits these via `window.track(name, props)`
* (declarative `data-track="…"` or programmatic) and server code via
* `captureServer(env, name, …)` from src/lib/analytics-server.ts.
*
* Names are stable snake_case English (locale-independent); the UI copy stays
* Turkish. Keep this list in sync with the PostHog/GA4 dashboards. When adding a
* surface, reuse an existing name with a discriminating prop (page/surface/
* location) rather than minting a near-duplicate.
*
* Destinations: page-level + conversions → GA4 **and** PostHog; granular
* product/funnel events → PostHog-first. Sentry is errors-only, never here.
*/
export const EVENTS = {
// page + navigation
pageView: "page_view",
navClick: "nav_click",
joinClick: "join_click",
socialClick: "social_click",
ctaClick: "cta_click",
// search
searchOpen: "search_open",
searchSubmit: "search_submit",
searchResultClick: "search_result_click",
// events
eventRegisterClick: "event_register_click",
eventCardClick: "event_card_click",
eventBannerDismiss: "event_banner_dismiss",
// blog
blogPostClick: "blog_post_click",
blogFilter: "blog_filter",
// generic list filtering (companies sector, …)
contentFilter: "content_filter",
// ecosystem long-form pages
partnerCardClick: "partner_card_click",
// recordings + podcasts + links
recordingPlay: "recording_play",
podcastCardClick: "podcast_card_click",
linkClick: "link_click",
linkRedirect: "link_redirect", // server
// contact / lead / newsletter
contactModalOpen: "contact_modal_open",
contactSubmit: "contact_submit", // server
generateLead: "generate_lead", // GA4 conversion (client)
newsletterSignup: "newsletter_signup",
// store
storeProductView: "store_product_view",
storeProductClick: "store_product_click",
storeVariantSelect: "store_variant_select",
storeReserveSubmit: "store_reserve_submit",
storeReserveSuccess: "store_reserve_success", // server + client mirror
storeReserveError: "store_reserve_error", // server
} as const;
export type EventName = (typeof EVENTS)[keyof typeof EVENTS];