This guide covers all configuration options for Vemetric SDKs and the self-hosted Vemetric platform.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/vemetric/vemetric/llms.txt
Use this file to discover all available pages before exploring further.
SDK Configuration
JavaScript SDK
Configure the JavaScript SDK using the globalvemetricConfig object:
Configuration Options
The URL of your Vemetric hub instance.Example:
https://hub.yourdomain.comFor self-hosted instances, this should point to your hub subdomain or custom domain.
Your project token from the Vemetric dashboard.You can find this in: Project Settings → API Keys → Project Token
Array of URL patterns to exclude from tracking. Supports wildcards (
*).Examples:/admin/*- Masks all admin pages/user/*/settings- Masks user settings pages/checkout/confirmation- Masks specific page
Whether to allow cookies for user tracking.Set to
false for cookieless tracking. Note that this may reduce accuracy for returning visitor identification.React SDK
Configure the React SDK via theVemetricScript component props:
Node.js SDK
Configure the Node.js SDK when creating the client instance:Configuration Options
The URL of your Vemetric hub instance.
Your project token.
Environment Variables
For self-hosted Vemetric instances, configure these environment variables.Core Configuration
Your project token for internal Vemetric tracking.
Base domain for your Vemetric instance.Defaults to
vemetric.localhost:4050 for development.Port for the development proxy server.Default:
4050Database Configuration
PostgreSQL connection string.
ClickHouse server URL for analytics data.
ClickHouse username.
ClickHouse password.
ClickHouse database name.
ClickHouse Migrations
ClickHouse host for running migrations.
ClickHouse user for migrations.
ClickHouse password for migrations.
ClickHouse database name for migrations.
Redis Configuration
Redis connection URL for caching and session management.
Authentication
Secret key for Better Auth session encryption.
Public URL for Better Auth callbacks.
Email Configuration
Secret for signing email verification and unsubscribe tokens.
Postmark API token for sending transactional emails.
Postmark message stream ID.Default:
outboundBilling (Paddle)
Paddle API key for payment processing.
Paddle webhook secret for verifying webhook signatures.
Queue Management
Username for accessing the BullBoard queue dashboard.Default:
bullboardPassword for accessing the BullBoard queue dashboard.Default:
passwordAvatar Storage (Optional)
Configure S3-compatible storage for user avatar uploads.AWS access key ID (or equivalent for S3-compatible services).
AWS secret access key.
S3-compatible endpoint URL.Examples:
- Cloudflare R2:
https://<account-id>.r2.cloudflarestorage.com - MinIO:
http://localhost:9000 - AWS S3: Leave empty to use default AWS endpoints
S3 bucket name for avatar storage.
S3 bucket region.For Cloudflare R2, use
auto.Public URL for accessing uploaded avatars.
Optional prefix for avatar object keys.Leave empty if using a dedicated subdomain (e.g.,
avatars.example.com).Project-Level Configuration
Configure project-specific settings in the Vemetric dashboard.Excluded IPs
Exclude specific IP addresses from analytics:- Navigate to Project Settings → Privacy
- Add IP addresses to exclude (one per line)
- Save changes
Excluded Countries
Exclude traffic from specific countries:- Navigate to Project Settings → Privacy
- Select countries to exclude
- Save changes
US, GB, DE).
API Keys
Manage API keys for programmatic access:- Navigate to Project Settings → API Keys
- Create new API keys with specific permissions
- Use keys in your backend applications
Configuration Files
Environment File
Create a.env file in your project root:
TypeScript Configuration
For TypeScript projects, add type definitions for environment variables:Configuration Best Practices
Use environment variables for secrets
Use environment variables for secrets
Always store sensitive configuration in environment variables:
Separate development and production configs
Separate development and production configs
Use different tokens and settings for each environment:
Validate required variables at startup
Validate required variables at startup
Check for required environment variables when your app starts:
Document your configuration
Document your configuration
Create a Commit this file to version control (without actual values).
.env.example file with all required variables:Troubleshooting
Events Not Appearing
CORS Errors
If you see CORS errors in the browser console:- Verify your hub instance is configured to allow requests from your domain
- Check that the
originheader is being sent correctly - Ensure your hub is accessible from the browser
Cookie Issues
If user tracking isn’t working across sessions:- Check that
allowCookiesis set totrue - Verify cookies aren’t being blocked by browser settings
- Ensure your site is served over HTTPS in production
- Check that cookies are being set with the correct domain
Next Steps
JavaScript SDK
JavaScript SDK reference
React SDK
React SDK documentation
Node.js SDK
Server-side tracking guide
Tracking Events
Event tracking best practices