From 1edc27d78d8401bc9528c2232d5cff73f15c5615 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Wed, 21 Oct 2026 05:33:51 +0000 Subject: [PATCH 1/2] No ads on the homepage; low-profile text-link ads elsewhere Homepage renders no ad unit. Remaining units are a single text_link line per page with quiet spacing, never against the footer. Co-Authored-By: Claude Opus 5.5 --- apps/web/app/(marketing)/page.tsx | 2 -- apps/web/app/globals.css | 8 +------- apps/web/components/ad-unit.tsx | 12 ++++-------- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/apps/web/app/(marketing)/page.tsx b/apps/web/app/(marketing)/page.tsx index 9b91165..a2c75b1 100644 --- a/apps/web/app/(marketing)/page.tsx +++ b/apps/web/app/(marketing)/page.tsx @@ -3,7 +3,6 @@ import { redirect } from 'next/navigation'; import { cookies } from 'next/headers'; import { Footer } from '@profullstack/footer/react'; import Script from 'next/script'; -import { AdUnit } from '../../components/ad-unit'; import { BrandLockup, BrandWordmark } from '../../components/brand'; export const dynamic = 'force-dynamic'; @@ -36,7 +35,6 @@ export default async function LandingPage() {
- diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css index f7d551f..e85ad5f 100644 --- a/apps/web/app/globals.css +++ b/apps/web/app/globals.css @@ -69,13 +69,7 @@ } .cp-ad[data-cp-filled] { height: auto; - margin: 32px auto; -} -.cp-ad[data-cp-filled][data-format='banner_728x90'] { - min-height: 106px; -} -.cp-ad[data-cp-filled][data-format='banner_300x250'] { - min-height: 266px; + margin: 8px auto; } .cp-ad[data-cp-filled][data-format='text_link'] { min-height: 40px; diff --git a/apps/web/components/ad-unit.tsx b/apps/web/components/ad-unit.tsx index ab0aca0..08b8fc5 100644 --- a/apps/web/components/ad-unit.tsx +++ b/apps/web/components/ad-unit.tsx @@ -4,7 +4,8 @@ import { useEffect, useRef } from 'react'; import { usePathname } from 'next/navigation'; /** - * One CrawlProof ad unit, under the hero of the public landing page. + * One low-profile CrawlProof ad unit (the text_link line). Not used on the + * homepage, which carries no ad. * Manage the slot at https://crawlproof.com/ads/slots */ const AD_SLOT = '121bb0bc-5e2e-4056-beeb-3c5166283991'; @@ -12,8 +13,6 @@ const AD_SLOT = '121bb0bc-5e2e-4056-beeb-3c5166283991'; /** Account, auth and checkout pages carry no ad. */ const EXCLUDED_PREFIXES = ['/login', '/join', '/verify', '/reset', '/forgot']; -/** 728x90 needs the full row; anything narrower gets the 300x250 rectangle. */ -const LEADERBOARD_QUERY = '(min-width: 768px)'; const SCAN_RETRY_MS = 200; const SCAN_MAX_TRIES = 25; @@ -43,11 +42,8 @@ function AdSlot() { const el = ref.current; if (!el) return; // The server renders the element without data-slot, so ad.js's own - // DOMContentLoaded pass skips it; the format is chosen here from the real - // viewport and the unit fills exactly once. - el.dataset.format = window.matchMedia(LEADERBOARD_QUERY).matches - ? 'banner_728x90' - : 'banner_300x250'; + // DOMContentLoaded pass skips it; the unit fills exactly once. + el.dataset.format = 'text_link'; el.dataset.slot = AD_SLOT; // ad.js scans once at DOMContentLoaded and may not have loaded yet, so From 29c5cadedfd3fd48d44516672c42963f7e139f16 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Wed, 21 Oct 2026 05:36:16 +0000 Subject: [PATCH 2/2] Format ad-unit.tsx Co-Authored-By: Claude Opus 5.5 --- apps/web/components/ad-unit.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/web/components/ad-unit.tsx b/apps/web/components/ad-unit.tsx index 08b8fc5..4ade591 100644 --- a/apps/web/components/ad-unit.tsx +++ b/apps/web/components/ad-unit.tsx @@ -13,7 +13,6 @@ const AD_SLOT = '121bb0bc-5e2e-4056-beeb-3c5166283991'; /** Account, auth and checkout pages carry no ad. */ const EXCLUDED_PREFIXES = ['/login', '/join', '/verify', '/reset', '/forgot']; - const SCAN_RETRY_MS = 200; const SCAN_MAX_TRIES = 25;