LogoTanStarter Docs
LogoTanStarter Docs
HomepageIntroductionCodebaseGetting StartedEnvironments
Configuration
Deployment

Integrations

CloudflareDatabaseAuthenticationEmailNewsletterStoragePaymentNotificationsAnalyticsChatboxAffiliates

Customization

MetadataPagesLanding PageBlogComponentsUser ManagementAPI Key Management

Codebase

Project StructureFormatting & LintingEditor SetupUpdating the Codebase
X (Twitter)

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:

VariableDescription
VITE_GOOGLE_ANALYTICS_IDGoogle Analytics tracking ID
VITE_UMAMI_WEBSITE_IDUmami Analytics website ID
VITE_UMAMI_SCRIPTUmami Analytics script URL
VITE_PLAUSIBLE_SCRIPTPlausible Analytics script URL
VITE_CLARITY_PROJECT_IDMicrosoft 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

Related Documentation

Email

Configure email services

Payment

Configure Stripe payments

Deployment

Deploy to Cloudflare Workers

Affiliates

Configure affiliate tracking

Table of Contents

Setup
Configure Environment Variables
Verify Integration
Related Documentation