Limit in-story ads based on length of the article

Nick 1 year ago in BLOX CMS • updated by Christine Masters (Director of Product Management) 2 months ago 32

Can we somehow limit ads on short stories? It just looks REALLY bad to break a couple of sentences up like this.



The new automatic ad placement provides what we spoke about in this ticket... it has automatic ads but also has a better layout for short stories. Let me know what you think!



This is a pet peeve of mine as well and a much-needed feature.


Yeah. It's really embarrassing because while ads are an integral part of our website I don't want people to feel like we're that desperate to serve ads. I think if there are fewer than 9 paragraphs there should only be two ads served. If there are fewer than 6 paragraphs only serve one ad. Or something like that.


Totally agree. This would be pretty easy to implement too. It could be made into a URL custom property that would set a threshold length in words or characters for an asset to get in-asset ads.

Under review

Hey guys,

I could use some help thinking this through.

So would it be enough if I just said, "Set the minimum number of paragraphs for a story to show multiple ads." If you set it to 5 paragraphs, then it would only show ONE in-story ad. Unless you had six paragraphs, then it would attempt to show all 3 ads.

Right now the default is 2. If there is only one paragraph, we show 1 ad. If there are 2 paragraphs, we show all three ads (as in Paul's screenshot).

Would that work for you?

I do want to address this - it is also a pet peeve of mine. But, I wouldn't want to change the logic on ads without a site being able to OPT into that decision (so they would know why their numbers changed).


I ended up talking myself into this as I typed it... I think it would work. I put in a feature request for this - but feel free to add ideas still! =)

I would be OK with this plan. Would there be a way to change the logic so that it could be "show ads every x paragraphs?" That way. if we set the ads at every 3 paragraphs, and had a 7 paragraph story, two ads would show, but the third would be left off? For publishers not wanting to change the logic at all, the default option could be "always show all ads."


Actually we've been discussing that. Facebook does this on Instant Articles (puts an ad every X paragraphs) and it actually increases your ad count but isn't obnoxious. I will see if we can get this in as an option.

Maybe a URL custom property under the advertising section. "Show Top Instory Ad after ___ paragraphs" and "Show Middle..." and "Show Bottom...."

Sites could set their desired settings, and if the article wasn't long enough to trigger them, the lower ads wouldn't show. You could set the custom property to zero for them to be turned on all the time.

I think the minimum number of paragraphs should be three. (This is so hard to explain in words) Have the ads at breaks of three paragraphs until it reaches 9 paragraphs. Then try to space them evenly.

3 paragraphs = 1 ad at the end

6 paragraphs = 1 ad between paragraphs 3 and 4 and 1 ad at the end

9+ paragraphs = spaced evenly(I guess how it's done currently)

I really hope this makes sense because it's taken me about 20 minutes to figure out how to even communicate this. -_-


I suppose we could customize our own templates to prevent this, but it does seem like a feature that should be baked in, perhaps as a URL custom property of some kind.

It would be presumptive of TownNews to not display the ads on a site b/c of the asset length — some papers may take offense at that. But giving us the built-in option would be good.

if I ran the zoo, I would have the positions show up in the editorial by screen as they will when they are live, and make it so we can move the ad up or down or totally delete it..


This is essentially what I'm pitching to development... a new "Infinity ad" setting. You can choose to have ads every X number of paragraphs.

- We would want them to be intelligently pre-loaded and lazy loaded (to improve viewability).

- There would be 1 ad at the end of paragraphs 1 - 3.

- Then another ad X (depending on number set) paragraphs later.

- This should also work on AMP pages!

- This should also work all story presentation modes... and any other place where in-story ads work.

The first ad will be after the 3rd paragraph. The next ad will be X number of paragraphs down the page (where X is defined by the site in a site setting).

Some examples:

X = Number of paragraphs between ads, as per setting
P = Number of paragraphs

If X = 5 & P = 2, you'll have one ad at the end of the story.

If X = 5 & P = 3, You'll have 3 paragraphs and then an ad at the end.

If X = 5 & P = 6, You'll have 3 paragraphs and then an ad, and then three more paragraphs.

If X = 5 & P = 8, You'll have 3 paragraphs and then an ad, and then 5 paragraphs and then an ad.

What do you guys think? Am I missing any logic?

It would be something you have to turn on, so all backwards compatibility would be maintained. And since you have to enable it, we could assume the new position would be filled. But, it would probably be just one ad slot (sort of like the in-gallery images).

Right now I'm thinking this is just one story slot that is rotated over and over.

That seems like it would be what we need. I think this will really enhance the look of short stories.


The new automatic ad placement provides what we spoke about in this ticket... it has automatic ads but also has a better layout for short stories. Let me know what you think!


I've tried to set this up on our website but it doesn't look like anything has changed. These are the settings I've changed...

Paragraphs between automatic ads: 5

Automatic ad block ID: fixed-big-ad-top-asset

We also have a fixed-big-ad-middle-asset and a fixed-big-ad-bottom-asset. How will those be affected? I'm assuming they will go away and it'll just be fixed-big-ad-top-asset that loads over and over until the story ends.

Hi Nick!

So happy you're trying this!

A few things:

1. You'll need to make sure to choose the new ad layout option... it's under the Advertising property group (in URL properties) and is called "ads on article pages." Choose "automatic ad placement."

2. The fixed big ad spot will show up on all stories (even one paragraph ones). The middle and bottom only show up if you can "afford" them in terms of paragraphs. After that, we have a new position that you can define that will repeat for every X paragraphs after that. I am not 100% sure about this, but I think it is possible that you can create an Ad Manager ad block that has the "region" set as fixed-big-ad-top-asset and that might work. Ad Manager will not show the same ad more than once, so you'd have to have multiple ads in rotation... but if you do, I think that would work. 

3. The "automatic block ID" is the numeric ID of the block itself, not the region name. So you'll need to change that as well. Just create an ad block, make the region "fixed-big-ad-top-asset," get the block ID (which is in the title of the block when you're editing it), and then enter the block here. The ID will be a six or seven digit number.

One last thing... so in this case, you're going to lose some impressions for your middle and bottom asset, because they won't run on short stories (contrary to how they do on the default ad layout behavior). Because you can't "afford" them in terms of paragraphs on those short stories.

But, in general, we see that when you have longer stories, you gain some impressions because of the new automatic ad spot. In your proposal, you'll be taking impressions from middle and bottom, and giving all of the new impressions to top. So top will be a lot more impressions than middle and bottom, whereas they should have been somewhat equal before.

Many times the top slot is your local ads and you WANT them to get as much traffic as possible, and if so, this is will be great for you. Or, if you have all local ads rotating equally in all three positions - which, looking briefly at your set up, is the case for you. So, this should work great.

But, perhaps for other people reading this, if you have different advertisers sold in all three spots, just note that the middle and bottom will likely lose a good percentage of their previous impressions, and the new automatic spot (whatever region you assign to that) will gain impressions.

Does that make sense?

Here is a step-by-step guide that goes through this process in detail: https://help.bloxcms.com/knowledge-base/applications/marketplace/banner_ads/article_e2f13ee6-db5a-11e7-9fbe-d3d198e52b03.html 

One problem I'm seeing is a "File Not Found" error. I think I've only ever seen it in the last ad of a story. I'm attaching a screenshot.

But this is a great addition to the FLEX system! I love it!

I figured out the problem. This is so awesome!

Anyone have any luck with getting Google AdSense ads working with this? I've set up the block following the guide Christine linked to, but AdSense ads won't load. Looking in the code, it seems that the block doesn't load at all.

If I put a custom ad block as an in-story middle (via the utility regions), they load through that no problem.

I don't have any AdSense ads on my site but I do have TownNews iQ ads and they load. When I first set it up no more than three ads loaded until I created an ad block and put in the actual block ID number in the page customizations. I missed those steps originally.

I've got the block id in place, even using the exact "automatic-ad-asset" name as well. I applied a static image ad to the location, and that didn't show up either.

I guess I'll go back to my custom In-Story Middle ad location for now. But I find it odd it's not loading.

Did you included fixed-big-ad-top-asset, fixed-big-ad-middle-asset and fixed-big-ad-bottom-asset? I have those three and automatic-ad-asset. I think the first three load and then the automatic ad loads if there are enough paragraphs. I'd like to look at the page source to see how it compares to mine.

One thing to note, for any block ad (or for any block for that matter) you can go to:


So, if you are troubleshooting why an ad block isn't showing up... one thing would be to see if that ad shows up with you go directly to it as described above.

Hey Robert, Would you mind putting back the ad the way you want it and then we can take a quick look? It looks like the settings are set up right now, but the ad itself doesn't have anything assigned to it.

Sure, I just re-enabled the static image ad I have in place. I've also disabled my In-Story middle from the utility region so the only one that (ideally) should be up is the auto ad.

Okay one sec... the block widget iframe is working now (I see the "Sample 3" ad) so that's good.

Hey Robert, I think the main thing right now is that we still serve the first three fixed ads (top, middle and bottom) before we serve the automatic ad spot. We did this just so that people didn't accidentally lose assigned ads when they added an automatic ad.

Also, remember that with a interval of 5 paragraphs before each ad, you're going to have 5 paragraphs, then fixed top asset, then 5 paragraphs, then middle, etc. So, if you want ads every 5 paragraphs, I would recommend assigning ads to the fixed top, middle and bottom spots in addition to the automatic ads. 

Do you know what you want to have in these spots? Sounds like you were thinking Ad Sense? Do you have that set up as a block or an ad now?

Okay, I think I follow now. I thought that it would just show the automatic placement ad every x amount of paragraphs. But it's dependant on ads being in the fixed-big-ad-[top/middle/bottom]-asset locations before it works?

We were looking into having a single ad block (usually filled with an AdSense ad, but sometimes others) that would repeat every 5 or so paragraphs. I think the way I was doing it before might be the best case for us still.

"Do you have that set up as a block or an ad now?"

We created a custom ad location for In-Story Middle utility region that displays a single ad in the middle of article assets.


I think we'd be more interested in this if we could choose to show the ad every x paragraphs without the fixed positions. It would be nice if we could choose fixed ads only, fixed with auto ads every x paragraphs or auto ads every x paragraphs only.

Yep, we are trying to think of a graceful way to do this, especially since there is already the "fixed ads" setting in the advertising panel anyway.

There was a discussion today that if you had "fixed ads" turned off, it would revert to all automatic ads every x paragraphs.

I do think it is a very legitimate use case for some users to have a few top ads locally sold, and then the rest are programmatic automatic ads. I was thinking maybe those could have a special target on them, so you could hit them with DFP? That way they could be the same ad unit, but just changed to a local ad based on a position target?

We are still talking about many different options here, but please if any one has thoughts let me know.

We want to get the best implementation while not breaking existing ads, of course.=D For some reason people get very moody if you break their ads.