Purpose-built analytics platform for tracking landing page interactions and user engagement patterns
๐ Published on December 13, 2025
A Custom Analytics System is a purpose-built tracking infrastructure that monitors user interactions, engagement patterns, and conversion behaviors specifically tailored to your application's unique needs. Unlike generic analytics platforms, it captures business-specific metrics and provides actionable insights aligned with your product goals.
Analytics Formula: User Events + Session Tracking + Database Storage + Admin Dashboard = Data-Driven Decisions
Track exactly what matters for your business without generic bloat
No expensive third-party subscriptions or per-event pricing
Complete control over your data without third-party dependencies
Instant access to your data without API rate limits
Add, modify, or remove tracking without vendor limitations
Build dashboards specific to your KPIs and metrics
// Initialize analytics singleton
class DemoAnalytics {
constructor() {
this.sessionId = this.generateSessionId();
this.events = [];
this.startTime = Date.now();
}
generateSessionId() {
return 'demo_' + Date.now() + '_' +
Math.random().toString(36).substring(2, 9);
}
trackEvent(action, data = {}) {
const event = {
sessionId: this.sessionId,
action,
timestamp: Date.now(),
timeFromStart: Date.now() - this.startTime,
data,
viewport: {
width: window.innerWidth,
height: window.innerHeight
}
};
this.sendEvent(event);
}
}The analytics system is specifically designed to track the current landing page structure of CeFinan, which has evolved to focus on conversion-optimized sections.
Purpose: First impression and value proposition
Components:
Tracked Events: Search queries, search results, Trustpilot clicks
Purpose: Interactive demo showcase
Features:
Tracked Events: Card views, copy actions, share clicks
Purpose: Feature transparency and future vision
Layout: Two-column display
Tracked Events: Section visibility, time spent
Purpose: Conversion and monetization
Plans: 10, 20, 50, 100 analyses (monthly/yearly)
Tracked Events: Plan selection, CTA clicks, pricing engagement
Purpose: Address objections and questions
Content: 11 expandable questions
Tracked Events: Question expansions, reading time, contact CTA
Previous versions included SimpleHeatmap, SimpleLineChart, and AIAnalysisPreview components. These are no longer rendered but their event types remain for backward compatibility with historical data.
Event Type: demo_search
Captured Data:
Event Type: demo_stock_selected
Captured Data:
Event Type: demo_cta_click
Captured Data:
Event Type: demo_copy_action
Captured Data:
Event Type: demo_scroll_progress
Captured Data:
โก Performance: Debounced with 500ms delay, tracks only 10%+ changes
Event Type: demo_session_summary
Triggered: On page unload or visibility change
Captured Data:
These events remain in the codebase for historical data compatibility:
demo_chart_interaction - Removed chartsdemo_heatmap_interaction - Removed heatmapdemo_ai_interaction - Removed AI preview sectionEach user session receives an engagement score based on their interactions:
| Event Type | Points | Rationale |
|---|---|---|
| Search | 2 | Basic exploration intent |
| Stock Selection | 5 | Strong interest signal |
| Chart Interaction | 3 | Data analysis engagement |
| CTA Click | 10 | Conversion intent (highest value) |
| Copy Action | 3 | Active data usage |
| Scroll Progress | 1 | Content consumption |
| Duration Bonus | 0-20 | Time-based engagement (max 20 pts) |
Score Interpretation:
Unique identifier for each user session (format: demo_timestamp_random)
Event type identifier (demo_search, demo_cta_click, etc.)
Exact time of event occurrence (client-side)
Milliseconds elapsed since session start
Event-specific metadata (query text, stock details, etc.)
Browser viewport dimensions for device analytics
The analytics admin dashboard at /admin/demo-analytics provides real-time visualization of user behavior and engagement metrics.
Filter data by time period:
High-level KPIs:
Event distribution with labels:
Conversion tracking:
Top searches with ranking:
Popular symbols:
User interaction quality:
Content consumption depth:
The dashboard provides context-aware insights based on the landing page structure:
Events are clearly marked to distinguish current vs. historical tracking:
Scroll tracking is one of the most valuable features of the custom analytics system, providing insights into content engagement depth and user attention spans.
Mean of the maximum scroll percentage reached per session
Breakdown by depth: 0-25%, 25-50%, 50-75%, 75-100%
Total sessions with scroll event data
The dashboard displays scroll data with color-coded progress bars:
Diagnosis: Content above the fold isn't engaging enough
Action:
Diagnosis: Good initial engagement, drop-off mid-page
Action:
Diagnosis: Excellent content engagement throughout
Action:
The analytics system enables continuous optimization through measurable insights:
Metric: Popular search queries
Insight: Understand what users are looking for
Action:
Metric: Click-through rates by button type and location
Insight: Which CTAs drive conversions
Action:
Metric: Most selected stocks from suggestions
Insight: User investment preferences and market sentiment
Action:
Metric: Engagement scores and session duration
Insight: User satisfaction and content quality
Action:
Metric: Viewport dimensions and user agent data
Insight: Device usage patterns (mobile vs desktop)
Action:
Track user interactions across landing page
Identify trends and user behavior insights
Form data-driven improvement hypotheses
Implement and measure improvements
Refine based on results and repeat
The custom analytics system is designed with privacy-first principles to comply with GDPR and data protection regulations.
No personally identifiable information is stored:
Client IP addresses are:
Only essential data is collected:
Configurable retention policies:
Protection measures in place:
Users are informed through:
Lawful Basis: Legitimate interest for analytics purposes
Data Minimization: Only essential data collected
Purpose Limitation: Data used only for analytics
Storage Limitation: Automated data retention policies
Integrity & Confidentiality: Secure data storage
Transparency: Privacy policy disclosure
User Rights: Data access and deletion upon request
Regular cleanup ensures data freshness and compliance:
The Custom Analytics System represents a privacy-first, cost-effective solution for understanding user behavior and optimizing landing page performance. By combining targeted event tracking, scroll progress analytics, and engagement scoring, it provides actionable insights that drive continuous improvement while maintaining full data ownership and GDPR compliance. This purpose-built system delivers exactly the metrics that matter for CeFinan's business goals without the overhead of generic analytics platforms. ๐๐