svelte-google-analytics
- Purpose: A Svelte component for integrating Google Analytics v4 into Svelte applications, enabling event tracking, page tracking, and user property management.
- Key Features:
- Supports multiple Google Analytics properties.
- Automatic pageview tracking (configurable).
- Comprehensive event tracking (predefined and custom events).
- User property and user ID management for segmentation.
- Dynamic configuration (enable/disable tracking, add properties post-initialization).
- Target Audience: Svelte developers needing Google Analytics integration with GDPR compliance support.
- Svelte Support: Designed specifically for Svelte v3.
- Event Tracking:
- Includes predefined events (e.g.,
games.earnVirtualCurrency
). - Custom events via
addEvent
.
- Includes predefined events (e.g.,
- User Management:
setUserProperties
for segmentation.setUserId
for session linking.
- Configuration:
- Disable/enable tracking dynamically (e.g., for GDPR compliance).
- Supports property-specific settings (e.g., disable automatic pageviews).
For more details, see the Google Analytics documentation .
sveltebeyonkgooglegoogle-analyticssvelte-google-analyticsvanillajstrackingseoanalytics
Featured Stories
No featured articles here. Navigate to an article, then pick the Feature on menu button