On many places over the internet you can find people suggesting the data-adtest="on" parameter to test ads on your local environment.

<ins className="adsbygoogle"
  style={{display:"inline-block", width:"360px", height:"180px"}}
  data-adtest="on"         // <-----------------------------

I could make it work with trial and error. Some sites even suggest that the proper name is data-ad-test.

But is there an official documentation about this?

If there is, I still haven't found it.

2 Answers 2


Seems like there isn't.

I also tried the data-adtest="on" approach and it didnt work for me either.

Source: https://stackoverflow.com/questions/54043177/how-do-you-render-google-ad-units-in-localhost

I couldn't find any official documentation about this parameter either.


Check this out: Testing modes

I found in the google developers site. Hope this will help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.