import { SetMetadata } from '@nestjs/common';

export const NO_TRACK_METADATA_KEY = 'analytics:no-track';

/**
 * Decorator to exclude a controller method from analytics tracking.
 *
 * @example
 * ```typescript
 * @NoTrack()
 * @Get('health')
 * healthCheck() {
 *   return { status: 'ok' };
 * }
 * ```
 */
export function NoTrack(): MethodDecorator {
  return SetMetadata(NO_TRACK_METADATA_KEY, true);
}
