/**
 * Umami Analytics Integration
 * 
 * To enable Umami Analytics:
 * 1. Get your Umami Website ID from your Umami dashboard
 * 2. Add to .env:
 *    UMAMI_WEBSITE_ID=your-website-id-here
 *    UMAMI_DOMAIN=analytics.yourdomain.com
 * 3. Set consent.analytics = true in cookie consent
 * 
 * The script will load automatically after user consent.
 */

export const UMAMI_CONFIG = {
  enabled: false, // Set to true after configuring .env
  websiteId: '', // Add your Umami Website ID
  domain: '', // Add your Umami domain (e.g., analytics.moreminimore.com)
};

export function getUmamiScript() {
  if (!UMAMI_CONFIG.enabled || !UMAMI_CONFIG.websiteId || !UMAMI_CONFIG.domain) {
    return null;
  }

  return {
    src: `https://${UMAMI_CONFIG.domain}/script.js`,
    'data-website-id': UMAMI_CONFIG.websiteId,
    defer: true,
  };
}
