diff --git a/src/app/actions.ts b/src/app/actions.ts index 2738f9c..b097c85 100644 --- a/src/app/actions.ts +++ b/src/app/actions.ts @@ -32,6 +32,11 @@ export interface DetectedSystem { name: string; } +export interface TrackingTool { + name: string; + id: string | null; +} + export async function extractMetaData(url: string, keyword?: string) { if (!url) { return { error: "URL is required." }; @@ -229,11 +234,10 @@ export async function extractMetaData(url: string, keyword?: string) { links.push({ href: absoluteUrl, text, type, rel }); }); - const detectedSystems: DetectedSystem[] = []; const htmlContent = $.html(); const uniqueSystems = new Set(); - // WordPress + // System Detection if ( $('meta[name="generator"][content*="WordPress"]').length > 0 || htmlContent.includes("/wp-content/") || @@ -241,47 +245,54 @@ export async function extractMetaData(url: string, keyword?: string) { ) { uniqueSystems.add("WordPress"); } - - // Shopify if ( htmlContent.includes("cdn.shopify.com") || htmlContent.includes("Shopify.theme") ) { uniqueSystems.add("Shopify"); } - - // Next.js if ($("#__next").length > 0) { uniqueSystems.add("Next.js"); - uniqueSystems.add("React"); // Next.js uses React + uniqueSystems.add("React"); } - - // React (generic) if ($("#root").length > 0) { uniqueSystems.add("React"); } - - // Webflow if ( $('meta[name="generator"][content="Webflow"]').length > 0 || htmlContent.includes("