Step 3: Ad Placements

Now that you've integrated Ezoic's scripts and set up your ads.txt file, it's time to add ad placements to your website. This final step will start displaying ads and generating revenue.

Create Your Ad Placements 🔗

First, you'll need to create ad placements in your Ezoic dashboard. These define where ads will appear on your website.

You can create placements yourself in your Ezoic Dashboard, or work with your Ezoic Onboarding Specialist for optimized placement recommendations.

Add Placement Code to Your Website 🔗

Once you have your ad placement IDs, add this code wherever you want ads to appear on your site:

1<div id="ezoic-pub-ad-placeholder-101"></div>
2<script>
3    ezstandalone.cmd.push(function () {
4        ezstandalone.showAds(101);
5    });
6</script>

Replace 101 with your actual placement ID from the dashboard. Insert this code for each ad location on your site.

Pages with multiple placements should pass all placement IDs into a single showAds() call. This reduces server requests and improves loading speed.

Example: ezstandalone.showAds(101, 102, 103, 104)

DO NOT add any styling to the actual placeholder div.

Adding styles or reserving space for the ad may result in empty white space if an ad doesn't load.

Calling ezstandalone.showAds() without defining a placeholder value will call the function for every placeholder that exists on that page.

Setup Complete 🔗

Once you have completed these steps, you have successfully implemented EzoicAds on your site. If you have any questions or need assistance, please reach out to Ezoic's support team.