Disable Local Tracking

Learn how to disable local tracking and ensure your tracking works in production.

Configuration

Disable Local Tracking

Disable local tracking in your configuration:

window.oppla.config({
  disableLocalTracking: true
});

Environment-Specific Configuration

Configure different settings for development and production:

// Development environment
if (process.env.NODE_ENV === 'development') {
  window.oppla.config({
    debug: true,
    disableLocalTracking: false
  });
} else {
  // Production environment
  window.oppla.config({
    debug: false,
    disableLocalTracking: true
  });
}

Best Practices

  1. Enable in Development: Keep local tracking enabled during development
  2. Disable in Production: Always disable local tracking in production
  3. Use Environment Variables: Configure based on environment
  4. Test Thoroughly: Verify tracking works in production

Common Issues

Local Tracking Still Active

  • Check configuration
  • Verify environment settings
  • Clear browser cache
  • Check for conflicting settings

Tracking Not Working

  • Verify configuration
  • Check network requests
  • Ensure proper initialization
  • Check for console errors

Next Steps