Skip to main content
All CollectionsMediavine AdsCustomizing your ad experience
How to manually place ads in your content with content hints
How to manually place ads in your content with content hints

Mediavine ads utilize ad logic in order to automatically place your in-content ads.

Eric Hochberger avatar
Written by Eric Hochberger
Updated over a week ago

For in-content ads, our script wrapper will real-time parse through your content for each user to find the most optimal positions to place your ads. It uses guidelines set out by Coalition for Better Ads, of which we are a member. Google is also a member, and uses the Coalition's guidelines in their Ad Experience Tool.

Depending on the size of a desktop user's window or the physical device a user is using will determine where the script wrapper inserts your content ads. (For full information on how this works, please see this help guide.)

If you'd rather decide where in your content you'd like to have your ads inserted, you can manually add an "hint" using HTML that our technology will look for. If it detects any of these hints, it won't use the logic to insert ads and will rely solely on these hints. 

Using your text editor, insert this code:

<div class="content_hint"></div>

If you insert this code three times, three ads will display. If you insert it four times, four will display, and so forth. 

If, for some reason, you need to have ads land in different spots based on whether your reader is on a mobile device or desktop computer, you can use the codes below:

<div class="content_mobile_hint"></div>
<div class="content_desktop_hint"></div>

To add the content hints using the Gutenberg editor, just add the code inside a Custom HTML block.


If you insert even one of these hints, the Mediavine script wrapper will not display in-content ads as usual. Ads will ONLY display where you inserted the hints. 

Please be sure not to place too many ads in your content. As a rule of thumb, you shouldn't have more than one ad per screenview when you manually place the ads to prevent you from going over the Coalition for Better Ad Standards limits of 30% ads and 70% content.

Contact us at or by using the blue chat bubble in the bottom right of your screen with any questions, or if you need any help!

Did this answer your question?