The AdSense code is generated from within your publisher account. This is the code that you'll need to add to your pages in order to display Google ads or a search box on your webpages. Please follow the steps below to generate your AdSense code:
- Log in to your account at https://www.google.com/adsense
- Visit the AdSense Setup tab
- Choose your product - AdSense for content to place ads on your site, AdSense for search to add a search box to your site.
- Follow the guided setup to choose a format and colors. You can also choose any additional options that may apply to
your site, including channels and alternate ads
- Your code will be generated in the Your ad code window according to your selections.
- Copy-and-paste the code into the source code of the webpages on which you wish to display Google ads or an AdSense for search box. For tips on adding the code to your page, read How do I add the AdSense code to my site?.
- If implemented correctly, Google ads or a search box will appear immediately. Initially, the ads that appear may be public service ads, for which you will not receive earnings. Once our crawlers have visited your page, however, targeted ads will begin to appear.