Every analytics tool wants a subscription. And your data. I built Twiligent instead. YouTube stats. Instagram stats. One dashboard. Runs locally on your machine.
export type TrackedContentType = 'youtube';
export const UNSUPPORTED_LINK_MESSAGE = 'Only YouTube video links can be tracked. Paste a youtube.com or youtu.be link.';
export function detectContentType(url: string | null | undefined): TrackedContentType | null {
const lower = (url || '').toLowerCase();
if (lower.includes('youtube.com') || lower.includes('youtu.be')) return 'youtube';
return null;
}