Analytics

Remove web analytics, added by vela enable analytics.

Syntax

$ vela disable analytics

Options

  • -y, --yes - Skip the confirmation prompt

What it removes

  • The analytics component in src/lib/components/analytics/, including the gtag helper for Google Analytics
  • <Analytics /> and its import from src/routes/+layout.svelte
  • The provider’s PUBLIC_* variables and their heading from .env
  • The posthog-js package, if it is installed

It works whichever provider you chose, and on static sites as well.

What it leaves

  • Code of your own that imports the component, gtag or posthog-js, which stops compiling once they are gone
  • The variables on your deploy targets. Remove them with vela env unset.
  • Your data at the analytics provider — nothing is deleted there