Get and copy the AdSense code – ABOUT MAG 2020

You obtain and copy the AdSense code from Ads page in your AdSense account. How you generate the AdSense code will depend on whether you use automatic ads or ad units. Note that for automatic ads, you only need the AdSense code, but for ad units, you need the AdSense code and the ad unit code.

How to obtain and copy the code for automatic ads

To generate the AdSense code for automatic ads, you must first set up automatic ads for the entire site. If you have already done so, you can obtain the AdSense code by following these steps:

  1. Sign in to your AdSense account.
  2. Click Ads and then global vision.
  3. Click Get code.
  4. Click Copy code snippet.

How to obtain and copy the code for ad units

To generate the code for ad units, you first need to create an ad unit. If you have already done so, you can obtain the AdSense code and the ad unit code by following these steps:

  1. Sign in to your AdSense account.
  2. Click Ads and then global vision.
  3. Click By ad unit.
  4. In the “Existing ad units” table, find the ad unit whose code you want to obtain.
  5. Hover over the ad unit and click Get code Embed.
  6. Copy the entire ad unit code.

Paula Fonseca