Skip to content

Ezoic Ad Placements

How TriposRai.com implements Step 3 of the EzoicAds onboarding guide.

Overview

With Step 1 (site scripts) and Step 2 (ads.txt) complete, Step 3 is mapping your Ezoic placement IDs to real estate on the site. Placement IDs are created in the Ezoic dashboard under Monetization → Ad Tester → Placements. Once you create them there, copy the numeric IDs into the codebase.

Placement Configuration

Every placement lives in src/config.ts for easy updates:

export const EZOIC_PLACEMENTS = {
  homepageTop: 0,
  homepageMid: 0,
  postHeader: 115,
  postFooter: 0,
};

Component Usage

EzoicAdSlot.astro outputs Ezoic’s required markup and hands the ID to our helper that queues ezstandalone.showAds() automatically:

{EZOIC_PLACEMENTS.postHeader ? (
  <EzoicAdSlot
    slotId={EZOIC_PLACEMENTS.postHeader}
    label="Article inline ad"
  />
) : null}

Because the component checks the ID, you can safely keep the tag in templates even when a slot is disabled in configuration.

Current Placement Map

Verification Checklist

For guidance on refreshing or destroying placements during SPA navigation or infinite scroll, see Ezoic Dynamic Content.