Many of you asked us about the best way to place Google ads on your Joomla sites. If your Joomla site is published and already has some content, you have an opportunity to monetize it with Google AdSense ads.
You have two options:
- Let Google place their ads on your site automatically. In Google Ads interface this option is called "Auto ads".
- Create ad units by yourself and then manually place them throughout your site as you see fit, unit-by-unit.
We previously wrote about how to use "Auto ads". In this blog post, you will learn how to display ad units manually.
Create a Google AdSense account
- Visit https://www.google.com/adsense/start.
- In the top right corner of the page, click "Get started":
This will bring you to the Google AdSense Sign-up page.
- Enter your site URL.
- Enter your email.
- Click either "Yes" or "No", depending on whether you would like to receive suggestions from Google AdSense.
- Click "SAVE AND CONTINUE":
- Enter your payment address details. Visit the "Enter your payment address details" page for detailed instructions.
- Verify your phone number (Not required in all countries.). Visit the "Verify your phone number" page for detailed instructions.
- Now visit your Google AdSense Home page. You might see the "Earnings at risk - You need to fix some ads.txt file issues to avoid severe impact to your revenue." message at the top of the page, as on the image below:
- On your "Earnings at risk..." error message, click "FIX NOW":
- You will see the "Create an ads.txt file" box appeared. Click "DOWNLOAD":
- Download the ads.txt file.
- FTP the ads.txt file to the root folder of your Joomla site:
- Allow Google AdSense some time, from a day to a few weeks, to find your ads.txt file. You will know that Google AdSense now recognizes your ads.txt file when you stop seeing the "Earnings at risk ..." message in your Google AdSense account Home page:
Once this message has gone, you are ready to place the Google AdSense ad units within the content of your Joomla site.
Create ad units
- In your Google AdSense account, click "Ads":
- Click "By ad unit":
- Click "Display ads":
- Create a descriptive name for your Google AdSense ad unit. As you can see on the screenshot below, I called my testing ad "Alex Test Ad Unit 01":
- On the right side of the screen, leave the default "Responsive" option as is and click the blue "Create" button:
- You will see the ad unit code snippet displayed. Click "Copy code snippet":
- Download the "Sourcerer" Joomla plugin from ReguarLabs.com and install it on your Joomla site.
- Open a Joomla article where you would like to display the ad unit.
- At the bottom of the screen, click the "Code" button:
- You will see the "Code" box. Paste the code snippet of your Google AdSense ad unit inside the "Code":
- In the top left corner of the box, click the "Insert" button:
- You will see the code snippet inside the text of your Joomla article:
- Click "Save" or "Save & Close" to save your edited article with the Google AdSense add.
- Allow a few minutes and then check your Joomla article at the frontend of your site. You should now see the Google AdSense ad unit displayed, just as you intended:
Save $1000's when you sign up to Joomlashack's Everything Club.
You will get access to all our 31 extensions, templates, and Joomla training.