Code implementation guide
Get and copy the ad code
After you've customized the appearance and settings of your ads or search box, the code you generated is displayed in the "Ad code" box.
This is the ad code that you'll copy and paste into your site's HTML source code.
If you've already created an ad unit but haven’t implemented the code yet, you can retrieve its code:
- Visit the My ads tab, find your ad unit in the list, and click Get code.
- Choose the code type that you want to use:
If you've chosen to create a responsive ad unit, you won't see the Code type drop-down in the “Ad code” box. Responsive ad units only use asynchronous ad code.
- To use the asynchronous ad code, leave the code type set to "Asynchronous" in the Code type drop-down.
- If you want to use the existing AdSense ad code, select "Synchronous" from the Code type drop-down.
- Select the code by clicking anywhere in the Ad code box. You'll see the code highlighted in blue.
- Next, from your browser's Edit menu, choose Copy to copy the highlighted area.