diff --git a/src/components/AdImage.tsx b/src/components/AdImage.tsx index 1e7f758..8e77b1b 100644 --- a/src/components/AdImage.tsx +++ b/src/components/AdImage.tsx @@ -53,30 +53,13 @@ export default function AdImage({ const id = ad.campaign_id || ad.slug; if (!id) return; + // One impression per pageview per banner, fired on mount. No viewport + // gate — too many ad slots sit below-the-fold and the IO threshold + // suppressed real signal. if (!beaconMount.current) { beaconMount.current = true; sendImpression(id, page, false); } - - const el = containerRef.current; - if (!el) return; - - const observer = new IntersectionObserver( - (entries) => { - for (const e of entries) { - if (e.isIntersecting) { - const now = Date.now(); - if (now - lastViewportFire.current >= 12000) { - lastViewportFire.current = now; - sendImpression(id, page, true); - } - } - } - }, - { threshold: 0.5 }, - ); - observer.observe(el); - return () => observer.disconnect(); }, [ad.src, ad.slug, ad.campaign_id, page]); if (!ad.src) return null;