Analytics
Learn how to configure analytics for your TanStarter application
TanStarter supports multiple analytics providers to track website traffic and user behavior. The following analytics solutions are supported:
- Google Analytics
- Umami Analytics
- Plausible Analytics
- Microsoft Clarity
Setup
Configure Environment Variables
Add the following environment variables to your .env file based on your chosen analytics provider:
| Variable | Description |
|---|---|
| VITE_GOOGLE_ANALYTICS_ID | Google Analytics tracking ID |
| VITE_UMAMI_WEBSITE_ID | Umami Analytics website ID |
| VITE_UMAMI_SCRIPT | Umami Analytics script URL |
| VITE_PLAUSIBLE_SCRIPT | Plausible Analytics script URL |
| VITE_CLARITY_PROJECT_ID | Microsoft Clarity project ID |
Verify Integration
Analytics components are in the src/components/analytics/ directory. Once the environment variables are set, analytics components are automatically enabled in production.
If you are setting up your environment, you can now go back to the Environment Configuration and continue. The rest of this document can be read later.
Environment Configuration
Set up environment variables
TanStarter Docs