feat: 5 fixes — dead site scoring, Kit Digital precision, social icons, GMB detection, social/GMB weighting
1. scorer: dead sites capped at 5 (was scoring HOT from SSL/CMS signals) 2. Kit Digital: require explicit kit-digital/agente-digitalizador signals; generic EU logo patterns (fondos-europeos, logo-ue, cofinanciado) removed. Gemini kit_digital_confirmed now overwrites heuristic in DB. 3. Browse table: social links replaced with compact coloured icon badges (fb/ig/in/x/tt/yt) linked to the profile URLs 4. site_analyzer: added has_gmb / gmb_url detection (Maps embed, Place links, LocalBusiness schema); fed to Gemini prompt 5. scorer: +5 no-social, +3 reachable contact; Gemini prompt includes GMB and social media management as sellable services; modal shows GMB/social status Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,6 +38,8 @@ def _build_prompt(a: dict) -> str:
|
||||
lorem_str = ", ".join(a.get("lorem_matches") or []) or "none"
|
||||
ph_str = ", ".join(a.get("placeholder_matches") or []) or "none"
|
||||
snippet = (a.get("visible_text_snippet") or "")[:2000]
|
||||
social_str = ", ".join(a.get("social_links") or []) or "none detected"
|
||||
gmb_str = f"✅ Found — {a.get('gmb_url','')}" if a.get("has_gmb") else "❌ Not detected"
|
||||
|
||||
eu_hosted = a.get("eu_hosted")
|
||||
hosting_flag = "✅ EU" if eu_hosted else ("❌ Non-EU" if eu_hosted is False else "unknown")
|
||||
@@ -86,10 +88,16 @@ Inputs without labels: {a.get("inputs_without_labels")}
|
||||
Lorem ipsum: {a.get("has_lorem_ipsum")} → {lorem_str}
|
||||
Placeholder: {a.get("has_placeholder")} → {ph_str}
|
||||
|
||||
=== KIT DIGITAL (Spanish gov €12k SME grants — sites must show EU logos) ===
|
||||
Detected: {a.get("kit_digital")}
|
||||
=== KIT DIGITAL (Spanish gov €12k SME grants — ONLY confirm if you see explicit Kit Digital / agente digitalizador branding) ===
|
||||
Heuristic detected: {a.get("kit_digital")}
|
||||
{kd_str}
|
||||
|
||||
=== GOOGLE MY BUSINESS ===
|
||||
GMB/Business Profile: {gmb_str}
|
||||
|
||||
=== SOCIAL MEDIA ===
|
||||
Profiles found on site: {social_str}
|
||||
|
||||
=== CONTACT CHANNELS ===
|
||||
{contacts_str}
|
||||
|
||||
@@ -99,7 +107,8 @@ Detected: {a.get("kit_digital")}
|
||||
=== INSTRUCTIONS ===
|
||||
The client sells: web redesign, SEO, hosting migration, SSL renewal,
|
||||
security audits, GDPR compliance, accessibility fixes, Google Ads,
|
||||
maintenance contracts, AI tools for SMEs.
|
||||
maintenance contracts, AI tools for SMEs, Google My Business setup/optimisation,
|
||||
social media management (Instagram, Facebook, LinkedIn, TikTok).
|
||||
|
||||
Respond ONLY with valid JSON, no markdown fences, no text outside the JSON:
|
||||
{{
|
||||
@@ -112,6 +121,8 @@ Respond ONLY with valid JSON, no markdown fences, no text outside the JSON:
|
||||
"gdpr_compliance": "cookie banner status, privacy policy, GDPR gaps",
|
||||
"accessibility_issues": ["specific a11y problems found"],
|
||||
"kit_digital_confirmed": true/false,
|
||||
"has_gmb": true/false,
|
||||
"has_social_media": true/false,
|
||||
"kit_digital_reasoning": "1 sentence",
|
||||
"is_local_sme": true/false,
|
||||
"lead_quality": "HOT|WARM|COLD",
|
||||
|
||||
Reference in New Issue
Block a user