Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Google Ad Manager rendering empty slots on the page

Avatar

Level 1

Hi Team ,

 

We have been integrating the Ad manager in our AEM site to display the sponsored ads on the page .But when there is no sponsored ad returned from google , an empty slot is being occupied due to the custom css being applied in the div element section.Could anyone please suggest how to get rid off the empty slots when there is no ad being returned from the Ad Manager.Any idea on this please?

 

Thanks in Advance!

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Sriga2898,

Are there any possibilities where you can set flag and check if the API returns empty or null value?

In this way I believe, we can render div tag based on condition.

eg in HTL - 

<sly data-sly-test="${api.value}">
........
</sly>

Hope that helps!

Regards,

Santosh

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @Sriga2898,

Are there any possibilities where you can set flag and check if the API returns empty or null value?

In this way I believe, we can render div tag based on condition.

eg in HTL - 

<sly data-sly-test="${api.value}">
........
</sly>

Hope that helps!

Regards,

Santosh