We have several Google Publisher tags on our pages, but in some cases there is no content to display, but still the slot takes up the allocated space and it looks like the page has gaps in between the slots. I have already followed the instructions given by Google https://developers.google.com/publisher-tag/samples/collapse-empty-ad-slots and also tried the advice with an event listener suggested in another thread. However, none of those worked.
The issue is that the slot is not empty when I check event.isEmpty. From what I could gather the slots have content, e.g. some ins tags, but nothing that can be visualized.
Does anyone have a suggestion how to hide such slots?