From 180e5005beb6d0caae974251a1ee5c3f03d27104 Mon Sep 17 00:00:00 2001 From: "[dyad]" Date: Wed, 21 Jan 2026 08:17:03 +0100 Subject: [PATCH] Reverted all changes back to version 28f5b5bc54ca38a5253f36a9ea96d544cfff2b8e --- src/app/actions.ts | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/app/actions.ts b/src/app/actions.ts index 9aa4be1..6d5c9f1 100644 --- a/src/app/actions.ts +++ b/src/app/actions.ts @@ -323,9 +323,7 @@ export async function extractMetaData(url: string, keyword?: string) { htmlContent.includes("connect.facebook.net") || htmlContent.includes("fbq('init'") ) { - const fbIdMatch = htmlContent.match( - /fbq\(\s*['"]init['"]\s*,\s*['"](\d+)['"]\s*\)/ - ); + const fbIdMatch = htmlContent.match(/fbq\('init', '(\d+)'\)/); addTracker("Facebook Pixel", fbIdMatch ? fbIdMatch[1] : null); } @@ -334,7 +332,7 @@ export async function extractMetaData(url: string, keyword?: string) { htmlContent.includes("static.hotjar.com") || htmlContent.includes("window.hj=window.hj||function()") ) { - const hjIdMatch = htmlContent.match(/hjid\s*:\s*(\d+)/); + const hjIdMatch = htmlContent.match(/hjid:(\d+)/); addTracker("Hotjar", hjIdMatch ? hjIdMatch[1] : null); } @@ -346,17 +344,13 @@ export async function extractMetaData(url: string, keyword?: string) { // Segment if (htmlContent.includes("cdn.segment.com")) { - const segmentIdMatch = htmlContent.match( - /analytics\.load\(\s*['"]([^"']+)['"]\s*\)/ - ); + const segmentIdMatch = htmlContent.match(/analytics\.load\("([^"]+)"\)/); addTracker("Segment", segmentIdMatch ? segmentIdMatch[1] : null); } // Mixpanel if (htmlContent.includes("cdn.mxpnl.com")) { - const mixpanelIdMatch = htmlContent.match( - /mixpanel\.init\(\s*['"]([^"']+)['"]\s*\)/ - ); + const mixpanelIdMatch = htmlContent.match(/mixpanel\.init\("([^"]+)"\)/); addTracker("Mixpanel", mixpanelIdMatch ? mixpanelIdMatch[1] : null); } @@ -367,9 +361,7 @@ export async function extractMetaData(url: string, keyword?: string) { // Plausible if (htmlContent.includes("plausible.io/js/")) { - const plausibleDomainMatch = htmlContent.match( - /data-domain\s*=\s*['"]([^"']+)['"]/ - ); + const plausibleDomainMatch = htmlContent.match(/data-domain="([^"]+)"/); addTracker( "Plausible", plausibleDomainMatch ? plausibleDomainMatch[1] : null