What is Google AdSense and why do you need to add it to your site?

As you know, AdSense is a popular advertising service of Google. By pasting the Google AdSense code, you can display ads not only in the form of text, images, but also videos on your website. Unlike banners, AdSense often showcases ads with relevant content to your website. In addition, AdSense ads don’t cause annoyance or discomfort to the site visitors since they will put advertising links on your site appropriately. Thanks to these ads, website owners can easily and effectively earn profits based on clicks. If you are seeking a simple way to add Google AdSense Code with Cassiopeia in Joomla 4, then don’t miss the blog today.

How to Add Google AdSense Code with Cassiopeia in Joomla 4

First of all, you need to create an AdSense account, then get the Adsense code. Simply follow the Google Code Implementation Guide to do that. When Google showcases the AdSense code snippet, let’s click on Copy Code Snippet.

Add Google Adsense Code With Cassiopeia In Joomla 4-1

Add Google AdSense Code directly

Now, log in to your Joomla 4 admin dashboard. After that, go to System -> Site Templates.

Add Google Adsense Code With Cassiopeia In Joomla 4-2

Next, let’s press on the Cassiopeia Details and Files to customize it.

Add Google Adsense Code With Cassiopeia In Joomla 4-3

In the /templates/cassiopeia folder, simply open the index.php file to edit it. Under the line containing the <head> tag, simply paste the Google Adsense Code you copied before.

Eventually, don’t forget to store your changes by clicking on the Save or Save & Close button. Everything is done.

Add Google Adsense Code With Cassiopeia In Joomla 4-4

Use KickstartCassiopeia module to add code

If you don’t want to add the code to the /templates/cassiopeia/index.php file directly, you can also use the KickstartCassiopeia module to do that. Thanks to the module, you can not only customize the header, change the footer background, add Topbar, etc but also add the Google AdSense code in an easy and simple way.

In order to use the module, you need to download KickstartCassiopeia first. After that, install the module to your Joomla 4 site.

Now, let’s go to Content -> Site Modules, then enter the module name on the search bar. Once the module appears, simply click to edit it.

Add Google Adsense Code With Cassiopeia 5

There are many options and tabs for you to customize. You can explore all the functions of this module with the previous blogs related to the Cassiopeia template.

In the Module tab, don’t forget to set it in published status and choose the position you want. With the Menu Assignment, you just need to choose On All Pages.

Next, let’s move on to the Custom Code tab. It’s time for you to paste the Google AdSense Code to the Custom head code box. Finally, simply save all your settings.

Add Google Adsense Code With Cassiopeia 6


All in all, we have already shown you the way how to add Google Adsense Code with Cassiopeia in Joomla 4. Therefore, don’t hesitate to earn money by using Google Adsense on your site. We hope that you are easily able to do that without any trouble. If you have any queries, why don’t you leave your comment below? Last but not least, whenever you desire to change a new interface for your site, don’t forget to visit our Joomla 4 Templates here. Thanks for your reading and see you next time.

5/5 - (4 votes)
Lt Digital Team (Content &Amp; Marketing)

Joomla! 5 update How to Upgrade Joomla! 4 to Joomla! 5? Read our blog
Black Friday & Cyber Monday Deal Grab 50% Off for everything on today, don't miss it. Coupon code: BFCM2023 Redeem Now