4.3 KiB
4.3 KiB
Forum Post Detail Tracking Spec
Scope
This document defines the tracking events emitted from /forum/post/<post_id> and accepted by /api/event/track.
Pricing CTA links on post detail may include prefill query params for /:
provider,region,memory,price,searchsource_post,source_title(used to show source context in pricing page UI)
CTA A/B Variant
- Query override:
?cv=controlor?cv=intent - Default behavior without
cv:- Stable assignment by hash of actor (
user_idor anonymousvisitor_id) - Experiment key:
forum_post_detail_cta_v1
- Stable assignment by hash of actor (
- Variant is exposed to frontend via
data-cta-varianton<body>.
Common Payload
All events are sent to POST /api/event/track:
event_name: snake_case event idlabel: short context string (max 120 chars server-side)post_id: current post idpage_path: current pathnamecta_variant:controlorintent(when available)device_type:mobile/desktop/tablet(best effort)
Server also appends user_id, visitor_id, referer, ip, timestamp in logs and persists rows into:
forum_track_events(event-level detail)forum_track_daily_summary(daily rollup byevent_day + cta_variant + event_name)
For SQL examples, see: docs/forum-post-detail-funnel-sql.md.
Admin Dashboard & Export
- Dashboard:
/admin/forum/tracking - Weekly dashboard:
/admin/forum/tracking/weekly - CSV export endpoint:
/admin/forum/tracking/export.csv - Weekly Markdown endpoint:
/admin/forum/tracking/weekly/export.md - Export params:
days: 1-90variant:all/control/intent/unknowndevice:all/mobile/desktop/tablet/unknownmode:recent/daily/variants/variant_funnel/device_variants/posts/labelsmode=variant_funnelincludes variant-level CTR, template submit rate, and template completion ratemode=postsincludes post-leveltemplate_clicks,template_submits, andtemplate_completion_rate_pct
- Weekly Markdown params:
day: report end day (inclusive, default yesterday UTC)days: window length (3-30, default 7)variant/device: same semantics as dashboard filters
Event Dictionary
| event_name | Trigger | label examples |
|---|---|---|
post_detail_cta_impression |
Detail page loaded | control, intent |
post_detail_mobile_bar_impression |
Mobile sticky conversion bar first visible | mobile_bar_visible |
post_detail_cta_pricing |
Main CTA click to pricing page | main_compare_plans_control, main_compare_plans_intent |
post_detail_cta_new_topic |
CTA click to create topic / login | main_post_requirement_control, sidebar_login_new_topic_intent |
post_detail_requirement_template_click |
Requirement template shortcut click | template_new_topic_control, template_login_new_topic_intent |
post_detail_requirement_template_submit |
Requirement template submit succeeded on /forum/post/new |
from_post_12_to_post_98 |
post_detail_sidebar_compare |
Sidebar pricing CTA click | sidebar_shortlist_control, sidebar_view_all_plans |
post_detail_jump_comments |
Jump-to-comments click | main_jump_comments_control, outline_jump_comments |
post_detail_related_click |
Related topic click | post title |
post_detail_plan_click |
Sidebar recommended plan click | Provider PlanName |
post_detail_inline_plan_click |
Inline plan card click | Provider PlanName |
post_detail_inline_plan_view_all |
Inline panel “view all” click | inline_view_all_plans |
post_detail_resource_click |
Resource link click | resource track label |
post_detail_comment_submit |
Comment form submit | comment_form |
post_detail_copy_link |
Copy link button click | copy_permalink |
post_detail_copy_link_success |
Copy succeeded | clipboard_api, clipboard_fallback, legacy_exec_command |
post_detail_copy_link_failed |
Copy failed | empty_url, clipboard_failed, legacy_failed |
post_detail_outline_click |
Auto-generated outline item click | heading anchor id |
Suggested Dashboard Cuts
- CTA conversion by variant:
post_detail_cta_impression->post_detail_cta_pricing
- Engagement by variant:
- comment submit rate
- copy link rate
- outline interaction rate
- Top content pathways:
- related click, resource click, plan click labels