1. Knowledge Base
  2. Tips to optimize your advertising

Hidden Ad Units

Do you use display:none and .hide() for ad unit divs? They're important for layout control and hiding/displaying elements on a webpage without removing or creating them again with JavaScript.

Any element (ad) on the page can be hidden, and the page will be displayed as if the element is not there. https://www.w3schools.com/css/css_display_visibility.asp

Set up: `display: none;`

Similar to the CSS `display:none`, the `hide()` jQuery method also hides the selected elements or ads. Hidden elements will not be displayed at all. https://www.w3schools.com/jquery/eff_hide.asp

However, note that if you are hiding any ad placements on the page using the attributes above or any other method, it will negatively affect their Viewability and send false calls to Google.

Viewability is one of the most important metrics to advertisers and is a major factor in determining an ad placement’s eCPM rates. Lower viewability would likely result in a lower eCPM.

In any case, if a publisher won’t remove any attribute that hides or cloaks their ad units, Venatus will deactivate these placements to avoid policy violations with Google until the issue is fixed.