Reverted all changes back to version 9c9ecf5050

This commit is contained in:
[dyad]
2026-01-21 08:17:02 +01:00
parent 2a4bbd5fcd
commit f41e2c1074

View File

@@ -323,12 +323,9 @@ export async function extractMetaData(url: string, keyword?: string) {
htmlContent.includes("connect.facebook.net") || htmlContent.includes("connect.facebook.net") ||
htmlContent.includes("fbq('init'") htmlContent.includes("fbq('init'")
) { ) {
let fbIdMatch = htmlContent.match( const fbIdMatch = htmlContent.match(
/fbq\(\s*['"]init['"]\s*,\s*['"](\d+)['"]\s*\)/ /fbq\(\s*['"]init['"]\s*,\s*['"](\d+)['"]\s*\)/
); );
if (!fbIdMatch) {
fbIdMatch = htmlContent.match(/facebook\.com\/tr\?.*?id=(\d+)/);
}
addTracker("Facebook Pixel", fbIdMatch ? fbIdMatch[1] : null); addTracker("Facebook Pixel", fbIdMatch ? fbIdMatch[1] : null);
} }
@@ -343,12 +340,7 @@ export async function extractMetaData(url: string, keyword?: string) {
// HubSpot // HubSpot
if (htmlContent.includes("js.hs-scripts.com")) { if (htmlContent.includes("js.hs-scripts.com")) {
let hsIdMatch = htmlContent.match(/js\.hs-scripts\.com\/(\d+)\.js/); const hsIdMatch = htmlContent.match(/js\.hs-scripts\.com\/(\d+)\.js/);
if (!hsIdMatch) {
hsIdMatch = htmlContent.match(
/_hsq\.push\(\s*\[\s*['"]setAccountId['"]\s*,\s*['"](\d+)['"]\s*\]\s*\)/
);
}
addTracker("HubSpot", hsIdMatch ? hsIdMatch[1] : null); addTracker("HubSpot", hsIdMatch ? hsIdMatch[1] : null);
} }