How to add floating AdSense Ad in Blogger

Floating AdSense AD Widget

A sticky AdSense ad is a type of ad unit that stays fixed in a designated location on a web page as the user scrolls. The ad remains visible on the screen even when the user scrolls up or down, making it more noticeable and potentially increasing the likelihood of clicks and impressions. This is often used to increase ad revenue for website owners.

Advantage of sticky AdSense ad

There can be many advantages but the main advantage of using sticky AdSense ads on a website is increased visibility and the potential for higher click-through rates (CTR).

As the ad remains in a prominent position on the screen as the user scrolls, it is more likely to be noticed and interacted with, leading to higher engagement and potentially greater revenue for the website owner.

Additionally, sticky ads can help to create a better user experience by freeing up more of the content area for actual content, rather than having ads that disrupt the flow of the page as the user scrolls.

Code to add sticky AdSense Ad to the website:

Here is the code you need to add this sticky, fixed, or floating AdSense ad to your website.

<div id="fixedban" style="width: 100%; margin: auto; text-align: center; float: none; overflow: hidden; display: scroll; position: fixed; bottom: 0; z-index: 999; -webkit-transform: translateZ(0);">
    <div>
        <a id="close-fixedban" onclick='document.getElementById("fixedban").style.display = "none";' style="cursor: pointer;">
            <img alt="close" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEhQfa-n3nqEXZu074CPoQelQx49QMaWspBYW4WCQYmOSb6x6jR4lmb3McDeAtudQWLQ4u8dwzr9NPwVsVW0s-Eep6prUpimfIN4IMTKm2-83QUJrgyIEAIEvGFPn98Ofklu0zBvt_lpLV/s1600/btn_close.gif" title="close button" style="vertical-align: middle;" />
        </a>
    </div>
    <div style="text-align: center; display: block; max-width: 728px; height: auto; overflow: hidden; margin: auto;">
        <!--Paste your AdSense AD Code here-->
    </div>
</div>
<script type="text/javascript">
    document.addEventListener("DOMContentLoaded", function () {
        var closedImg = document.querySelector("img#closed");
        var blBanner = document.querySelector("#bl_banner");

        closedImg.addEventListener("click", function () {
            blBanner.style.display = "none";
        });
    });
</script>

Are Sticky AdSense ads allowed by AdSense?

Google AdSense policies allow for floating ads, as long as they meet certain requirements. Floating ads are defined as ads that move or "float" around on a web page as the user scrolls, and they can be implemented as a type of sticky ad.

However, Google AdSense policies prohibit the use of excessive animations or distracting behavior in ads, and floating ads must meet these requirements. Additionally, floating ads must also meet the general AdSense policies regarding ad placement and implementation.

It's important to review and understand the AdSense policies before implementing floating ads on your website to ensure that they are in compliance and to avoid any potential issues or violations.

How to ad Sticky AdSense in blogger or wordpress

To add sticky or floating AdSense ads in blogger or WordPress you need to copy the code given above. Change the AdSense ad code and paste the code anywhere on your website.

Related Posts

M.Muzammil

I am a web Designer & Graphics Designer. I love to program and design. Sharing knowledge is my passion & Programming is my Hobby. Want Help? Contact Me its free.!

2 Comments

Add Comment
M.Muzammil

Espere el próximo artículo, compartiré el método para mostrar AD en ambos lados. Gracias por tus comentarios.

Anonymous

Amigo, como lo hago para ponerlo en los lados, ya sea izquierdo o derecho