M
M
max10212018-02-06 17:21:55
JavaScript
max1021, 2018-02-06 17:21:55

Which extension should I choose for google adsense ads?

Gentlemen, this is the question. If I want to move a google adsense ad script outside the site markup, which extension should I choose. I suspect .js, but I could be wrong. That is, in other words, I want to push the advertising script into a separate file, and then insert it into the markup.
As far as I understand, similar script looks like this5a79b9f85a900966303686.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Exploding, 2018-02-06
@max1021

Well, how-how ... like this, probably:
index.php

....
<body>
<header>Типа_меню</header>
<?
   include "my_adsense_data_file.php";
?>
</body>
....

my_adsense_data_file.php:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" ... ></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Although what "probably". Exactly!
Or in some other way...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question