D
D
Drold2015-12-24 19:44:05
Google Adsense
Drold, 2015-12-24 19:44:05

Is it possible to insert a script from Adsense (adsbygoogle.js) once?

There is this code:

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

And it is repeated in each ad block (2-3 times), is it possible to insert this code once before </body>?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sly Mitriy Karpov, 2016-08-02
@Drold

If there are multiple ad units on a web page, do I need to add <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></ script> code for each of them?
This is not necessary, the adsbygoogle.js script only needs to be downloaded once.

Proof: https://support.google.com/adsense/answer/3221666?hl=en

D
Dimonchik, 2015-12-24
@dimonchik2013

you can’t
insert the code unchanged - even if it works, they can be accused of violating it, it’s terribly inconvenient when you have to fire all the resources by ID, but these are the rules

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question