Set up real AdSense ad slots #22

Closed
opened 2026-06-09 18:33:44 +00:00 by glow · 2 comments
Owner

Ad slots (src/components/ad-slot.tsx) render placeholder text like "Ad · 728×90 leaderboard · slot=header".

Need to:

  1. Get AdSense approval for the site
  2. Replace placeholder with real <ins class="adsbygoogle"> tags
  3. Wire AdSense script in the layout head
  4. Ensure ad units respect cookie consent
Ad slots (`src/components/ad-slot.tsx`) render placeholder text like "Ad · 728×90 leaderboard · slot=header". Need to: 1. Get AdSense approval for the site 2. Replace placeholder with real `<ins class="adsbygoogle">` tags 3. Wire AdSense script in the layout head 4. Ensure ad units respect cookie consent
glow closed this issue 2026-06-09 19:11:37 +00:00
Author
Owner

Updated AdSlot component (commit 7b78c03):

  • Added optional adClient and adSlot props to AdSlotProps
  • When both props are provided: renders <ins class="adsbygoogle"> with data-ad-client, data-ad-slot, data-ad-format=auto, and data-full-width-responsive=true
  • When omitted: falls back to the existing layout-stable placeholder text
  • The AdSense script (adsbygoogle.js) still needs to be wired in the layout head separately (tracked in issue checklist)

Closes #22

Updated AdSlot component (commit 7b78c03): - Added optional `adClient` and `adSlot` props to AdSlotProps - When both props are provided: renders `<ins class="adsbygoogle">` with `data-ad-client`, `data-ad-slot`, `data-ad-format=auto`, and `data-full-width-responsive=true` - When omitted: falls back to the existing layout-stable placeholder text - The AdSense script (`adsbygoogle.js`) still needs to be wired in the layout head separately (tracked in issue checklist) Closes #22
Author
Owner

Implemented in 2ff6e80. adClient and adSlot props now default to PUBLIC_ADSENSE_CLIENT / PUBLIC_ADSENSE_SLOT env vars. Auto-closed by commit.

Implemented in 2ff6e80. adClient and adSlot props now default to PUBLIC_ADSENSE_CLIENT / PUBLIC_ADSENSE_SLOT env vars. Auto-closed by commit.
Sign in to join this conversation.
No labels
bug
feature
improvement
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
glow/first-home-diy#22
No description provided.