- Created /js/pw-analytics.js with conversion funnel events - Added to Base.astro layout (all Astro pages) + 6 static HTML pages - Events tracked: compliance-check-start, compliance-check-complete, order-cta-click, checkout-page-view, checkout-start, esign-opened, esign-submitted, campaign-click (UTM attribution), contact-form-submit - Server-side payment-complete event from checkout webhook via Umami API - Auto-tracks any element with data-track="event-name" attribute Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
66 lines
2.4 KiB
Text
66 lines
2.4 KiB
Text
---
|
|
// Base layout with production site chrome (nav, footer, support widget).
|
|
// Reads nav.html and footer.html partials extracted from the production
|
|
// homepage and includes them around the page content.
|
|
|
|
import { readFileSync } from "fs";
|
|
import { resolve } from "path";
|
|
|
|
export interface Props {
|
|
title: string;
|
|
description?: string;
|
|
}
|
|
|
|
const { title, description = "" } = Astro.props;
|
|
|
|
// Read the nav + footer partials (extracted from prod homepage)
|
|
let navHtml = "";
|
|
let footerHtml = "";
|
|
try {
|
|
navHtml = readFileSync(resolve("src/partials/nav.html"), "utf-8");
|
|
footerHtml = readFileSync(resolve("src/partials/footer.html"), "utf-8");
|
|
} catch {
|
|
// Partials not found — render without chrome (dev fallback)
|
|
}
|
|
---
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>{title} | Performance West Inc.</title>
|
|
{description && <meta name="description" content={description} />}
|
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
<script defer src="https://analytics.performancewest.net/script.js" data-website-id="55250014-ee15-44ac-a1f6-81dabad3fe0f"></script>
|
|
<script defer src="/js/pw-analytics.js"></script>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
<link rel="stylesheet" href="/_astro/about.DhmoKVOS.css" />
|
|
<script type="module" src="/_astro/hoisted.yFz1BYXO.js"></script>
|
|
<script>
|
|
window.__PW_API = (function() {
|
|
var h = window.location.hostname;
|
|
if (h === "localhost" || h === "127.0.0.1") return "http://" + h + ":3001";
|
|
if (h === "dev.performancewest.net") return "https://api.dev.performancewest.net";
|
|
return "https://api.performancewest.net";
|
|
})();
|
|
</script>
|
|
<style is:global>
|
|
:root {
|
|
--pw-navy: #1a2744;
|
|
--pw-blue: #2d4e78;
|
|
--pw-light: #f8fafc;
|
|
--pw-ink: #1f2937;
|
|
--pw-muted: #64748b;
|
|
--pw-green: #059669;
|
|
--pw-amber: #b45309;
|
|
}
|
|
</style>
|
|
</head>
|
|
<Fragment set:html={navHtml} />
|
|
<main class="flex-1">
|
|
<slot />
|
|
</main>
|
|
<Fragment set:html={footerHtml} />
|
|
</html>
|