Welcome to WebmasterWorld Guest from 35.172.195.49

Forum Moderators: martinibuster

Message Too Old, No Replies

Conditional ad display depending on page length

Is this possible?

     
2:01 am on Sep 14, 2016 (gmt 0)

Preferred Member

10+ Year Member

joined:Nov 15, 2007
posts:620
votes: 2


Now that adsense has "relaxed" its ad number limits, I am thinking of ways to optimize space farther down my pages. I have a wide range of content from all is above the fold to several thousand word articles. I also have two or three column layouts that are often blank because the main article/column is much longer than the sidebar(s).

So what I'm wondering is whether there's a way to display ads only on longer pages, (however that be defined) so I can fill some of the white space in the sidebars. Obviously some coding would be required, unless there's a ready made solution for a straight html site.

You folks have any thoughts on this? Anyone doing this willing to share?
3:21 pm on Sept 16, 2016 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Feb 25, 2004
posts:1003
votes: 47


If you're using a CMS and you want to place ads "in content," you could configure your page template to inject ad code every so many paragraphs.
3:28 pm on Sept 16, 2016 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member netmeg is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Mar 30, 2005
posts:13012
votes: 222


I don't know of any ready made solution. My dev programmed something similar to what Broadway suggests, where an ad is injected every x number of listings on my events pages. We had it capped at three, but since I have some really really long pages at certain times of the year, I may expand that.