Solved

Loading second position adsense ad before first, how to?

Posted on 2013-02-05
4
250 Views
Last Modified: 2013-02-05
My midpage adsense ad receives a higher ctr than my first (top) ad.

As per a suggestion from google, I would like to load my midpage ad first, so it uses the highest bid.

http://support.google.com/adsense/bin/answer.py?hl=en&answer=187769 

However, their example shows a way to set the ad into an absolute position on the page.

The way my page template works, the adsense ad is embedded in content. It appears after the fourth paragraph.

Is there a way I can put the ad code in a div and have it load prior to the others (as per their example) and then have a div that actually displays it in a way that it's not an absolute position, so I can do this:

paragraph-1
paragraph-2
paragraph-3
paragraph-4
<div> (show previously loaded ad here)</div>
paragraph-5
paragraph-6

Clear examples appreciated :) :)

Chris
0
Comment
Question by:St_Aug_Beach_Bum
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38856615
it would be easier if you posted a link to the page so we can see how it is coded.  I am thinking that you could hold the add off by putting the code at the end of the page and putting the container in its normal place but empty, then just put the add into the innerHTML of the container.

The problem is it might make the load a little quirky and we will need to see the code to see if we can minimize the elements from jumping around during load.

Cd&
0
 

Author Comment

by:St_Aug_Beach_Bum
ID: 38856741
Hi Cd&,

Thank you for taking a look, an example is here: http://shoutkey.com/figure 

though the goal is to load that second (positioned) ad first, as google adsense places the highest bidder in the first spot to load. So if I were to load the other two ads at the end that might work...
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 38856864
if in your code where you want an ad just put in an empty span with an id:
<span id="add1"></span>
One for each ad location.

The move the ad generation code to the end of the page into a set of hidden eleemnts using Display: none in the CSS.

Then you can move the add into the the span with
document.getElementById('ad1').innerHTML= document.getElementById('hiddenad1').inerHTML;

Cd&
0
 

Author Closing Comment

by:St_Aug_Beach_Bum
ID: 38857801
Thank you COBOLdinosaur!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question