Descargas v6

 function floating_admager_script() {

    ?>

    <script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>

    <script>

      window.googletag = window.googletag || {cmd: []};

      googletag.cmd.push(function() {

        googletag.defineSlot('/23007865738/visildpr2', [[300, 100], [300, 250], [300, 600]], 'div-gpt-ad-1716508766432-0').addService(googletag.pubads());

        googletag.pubads().enableSingleRequest();

        googletag.enableServices();

      });

    </script>

    <!-- /23007865738/visildpr2 -->

    <div id='floating-ad-container' style='position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9999;'>

      <div id='div-gpt-ad-1716508766432-0' style='min-width: 300px; min-height: 100px;'>

        <script>

          googletag.cmd.push(function() { googletag.display('div-gpt-ad-1716508766432-0'); });

        </script>

      </div>

    </div>

    <style>

        #floating-ad-container {

            transition: all 0.5s ease-in-out;

        }

    </style>

    <script>

        // Ensure the floating ad remains interactive

        document.getElementById('floating-ad-container').addEventListener('mouseover', function() {

            this.style.opacity = '1';

        });

        document.getElementById('floating-ad-container').addEventListener('mouseout', function() {

            this.style.opacity = '0.8';

        });

    </script>

    <?php

}

add_action('wp_footer', 'floating_admager_script');

Comentarios