feat: PostHog analytics wiring across all key screens
- Commit untracked posthog_service.dart (fire-and-forget HTTP client,
EU data residency, already used by auth for identify/reset)
- screen() calls: Home, Contribute, Profile, EventDetail (with event_id)
- capture('event_tapped') on hero carousel card tap (source: hero_carousel)
- capture('book_now_tapped') in _navigateToCheckout (event_id + name)
- capture('review_submitted') in _handleSubmit (event_id + rating)
- Covers all 4 expansion items from security audit finding 8.2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,7 @@ import '../widgets/landscape_section_header.dart';
|
||||
import '../widgets/tier_avatar_ring.dart';
|
||||
import '../features/share/share_rank_card.dart';
|
||||
import 'contributor_profile_screen.dart';
|
||||
import '../core/analytics/posthog_service.dart';
|
||||
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
// Tier colour map
|
||||
@@ -102,6 +103,7 @@ class _ContributeScreenState extends State<ContributeScreen>
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
PostHogService.instance.screen('Contribute');
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
context.read<GamificationProvider>().loadAll();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user