T
T
testuserar2018-09-08 11:48:39
JavaScript
testuserar, 2018-09-08 11:48:39

How do I know that a Google AdSense ad has loaded?

Is there any way to find out on the client if the AdSense ad has loaded? The fact is that ads are not loaded on some pages, and I would like to show, for example, Yandex (rysya) ads instead of AdSense.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dollar, 2018-09-08
@dollar

You can analyze the presence of a banner on the page, its size, and in case of absence, try to show another advertisement. But the fight against AdBlock is such a rather disastrous business.
Here, for example, the user has the following entries in the hosts file:

127.0.0.1   pagead2.googlesyndication.com
127.0.0.1   an.yandex.ru

What are you going to do? It does not show your ads in principle, no matter how hard you try.
And if JS is disabled, like mine? All you can do is to keep the user on the site longer with interesting content so that he does not return to the Google search results, otherwise Google will think that your site is not interesting and lower his position.
Conclusion - make the site interesting and useful . This will increase traffic, and hence the display of advertising. And those who do not display it, ignore and do not offend.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question