Any easy way to disable ads during development?

I am working on sites that will contain the addition. However, I do not want these ads to appear during development.

Is there any easy way to disable javascript code generated by google adsense? For example, a flag? Should I come up with something in a jQuery document? Looking for a clean and easy solution. Thanks.

+4
source share
1 answer

You can definitely wrap JavaScript Adsense in a conditional expression and set a flag at the top of the document if you want; just remember to remove it during the build process or when you are ready to send your code.

Although technically possible, I would suggest against this. I wouldn’t worry too much about imposing my reports or anything else - as pointed out in the comments on your question, Google is not entirely new; they can determine when it is a good time to show money advertising, and when it is a good time to just throw in some fillers.

Please note that I do not represent Google, and I cannot say what your activity will be suspended. If you want to protect yourself from accidental clicks, I would suggest that you continue to work and turn off ads during development. Better than sorry.

+3
source

All Articles