1

I am looking for an ad rotation system that I can use w/ Google adsense. I have a roughly 520x240 space that I would like to rotate 7-8 adsense ads through. It would be nice if I could find a solution with smooth looking ad rotation animation. Anybody doing anything like this?

Thank!

3 Answers 3

4

Rotating AdSense ad units on a page is probably a violation of the AdSense Program Policies, specifically "Direct user attention to the ads using arrows or other graphical gimmicks." It could jeopardize your account.

Besides, what would be the point of rotating the ad units in the first place? The same ads would show, because the content of the page isn't changing.

2
  • That's a good point. Basically I want to put 1 of my own website advertisements in the banner location, and then rotate that with paid advertising. If this is forbidden by Google maybe I'm SOL.
    – user547794
    Mar 2, 2011 at 20:43
  • Yeah, I wouldn't do anything that brings undue attention to the AdSense ad unit, rotating it in and out would do that. You can certainly have a different ad show when the page refreshes, though. The problem is rotating the ads while a page is being displayed, that's the no-no. Mar 4, 2011 at 15:09
0

Why don't you use jQuery?

First you call the new ad by making an AJAX call to a small file containing your Adsense code. Once loaded you fadeOut the old ad and fadeIn the new ad.

If you recall this function after a specific amount of seconds, you can keep rotating your ads very easily!

0

I have done something similar, but using Jquery to do the transition for database tables written in php. Should be easy enough just edit this code and have everything work correctly for what you want to do with the adsense. The rotation is utilized with the content within the div tags. Good luck

 <!-- include jQuery library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>

    <!-- include Cycle plugin -->
    <script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.2.74.js"></script>

    <!--  initialize the slideshow when the DOM is ready -->
    <script type="text/javascript">
    $(document).ready(function() {
        $('.slideshow').cycle({
            fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
            timeout:12000 
        });
         $("#activities").load("../includes/activities.php");
       var refreshId = setInterval(function() {
         $("#activities").load('../includes/activities.php');
       }, 9000);
        $("#troubletickets").load("../includes/tickets.php");
       var refreshId = setInterval(function() {
          $("#troubletickets").load('../includes/tickets.php');
       }, 9000);
       $("#projects").load("../includes/projects.php");
       var refreshId = setInterval(function() {
          $("#projects").load('../includes/projects.php');
       }, 9000);
    });
    </script>
    <LINK REL=StyleSheet HREF="../css/style.css" TYPE="text/css">

    </head>
     <body>
    <div class="slideshow">
        <div id="troubletickets"></div>
        <div id="activities"></div>
        <div id="projects"></div>
    </div>
</body>
</html>
2
  • 1
    Fading the ads in and out is a good way to lose your account. Mar 1, 2011 at 16:36
  • I dont use the script here for ads, but it is how you could do it if thats what you wanted to do. This code is just demonstrating how to rotate div tags. I do agree with you regarding jeapordizing an account though, and wouldnt recommend rotating your ads.
    – lockdown
    Mar 1, 2011 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.