Display a test ad

This example displays a test ad using the Google Publisher Tag library. See Get Started with Google Publisher Tags to learn more about how this sample works.

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Hello GPT</title>
    <script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
    <script>
      window.googletag = window.googletag || {cmd: []};
      googletag.cmd.push(function() {
        googletag
            .defineSlot(
                '/6355419/Travel/Europe/France/Paris', [300, 250], 'banner-ad')
            .addService(googletag.pubads());
        googletag.enableServices();
      });
    </script>
  </head>
  <body>
    <div id="banner-ad" style="width: 300px; height: 250px;">
      <script>
        googletag.cmd.push(function() {
          googletag.display('banner-ad');
        });
      </script>
    </div>
  </body>
</html>