Posted in Google Ads on April 27, 2017 – 09:56 am
Code implementation guide
To generate your AdSense ad code you first need to create an ad unit. You do this on the tab in your AdSense account. There are a few different types of ad unit that you can choose from. Once you've decided which type of ad unit you want to create, follow the steps below to get and copy your ad code.
Ad unit: A set of Google ads displayed as a result of one piece of AdSense ad code.
Types of ad unit
AdSense offers several different types of ad unit. If a standard ad unit doesn't meet the requirements of your site, consider using one of our more specialized ad units:
Type |
Description |
Ad unit |
Custom-sized ad unit |
- Non-standard size ad unit
|
Responsive ad unit |
- Adaptable ad unit
- Allows you to support a wide range of devices (i.e., computers, phones, tablets, etc.) by automatically adapting its size to fit your page layout. Learn more about responsive ad units.
|
Matched content unit |
- Block of content recommendations
|
How to get and copy your ad code
Select an option below and follow the instructions to get and copy your ad code:
If you haven't yet created an ad unit
Visit the tab.
In the sidebar, select your product. For example, if you want to display ads on your website, select "Content".
Click +New ad unit.
Give your ad unit a name. It’s a good idea to use a unique, descriptive name that will help you find this ad unit later.
In the "Ad size" section, choose the size of the ads that you’d like to show. In general, wider ad units perform better. We encourage you to choose one of our recommended ad sizes, which have shown to perform well across a variety of sites. Ad sizes that perform well on mobile are shown with a mobile icon .
Select which type of ads you’d like to show on your pages from the Ad type drop-down. We highly recommend that you display both text and display ads. By displaying more ad types, you can earn more revenue.
In the "Backup ads" section, leave the drop-down set to "Show blank space" (the default) unless you’d like to show something else if Google has no targeted ads available. Learn more about backup ads.
Click Save and get code.
In the "Ad code" box that opens:
Leave the code type set to "Asynchronous" (the default), unless you want to use synchronous ad code. Learn more about asynchronous ad code. 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.