Table of Contents

Ad - AdSense

About

AdSense is the Ad Network of Google.

It's intended to be simple. If you want more control, you need to use the AdManager.

Script

The adsense script is pagead2.googlesyndication.com/pagead/js/adsbygoogle.js that is loaded in a header.

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

Adding an ad unit ask two piece of code:

<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9530166455702489"
     data-ad-slot="9424922515"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Why the push ?

Glossary