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
This commit is contained in:
2026-04-04 18:45:19 +05:30
parent a32ead31c2
commit 42b71beae2
6 changed files with 116 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ import '../core/app_decoration.dart';
import '../core/constants.dart';
import '../widgets/landscape_section_header.dart';
import '../features/share/share_rank_card.dart';
import '../core/analytics/posthog_service.dart';
class ProfileScreen extends StatefulWidget {
const ProfileScreen({Key? key}) : super(key: key);
@@ -99,6 +100,7 @@ class _ProfileScreenState extends State<ProfileScreen>
@override
void initState() {
super.initState();
PostHogService.instance.screen('Profile');
// Animation controller for EXP bar + stat counters
_animController = AnimationController(