What is Old and New AdSense Ad Code?
Google updated the script of AdSense ad codes in order to help publishers customizing their ads within AdSense account. This means the new ad codes can be updated within your AdSense account and you do not need to replace the codes in every page of your website. The old AdSense code will have the script line like “google_ad_type = “text”” whereas the new AdSense code will not have this line.
If you are using old ad units and like to update to the new one but still want to retain the settings of the old one then Google offers a simple solution called “import old ad code”.
This option helps webmasters to get the new code instantly instead of going through the entire process of editing ad settings and colors again. Follow the below steps to upgrade your old ad code to a new AdSense ad code using “import ad code” option.
- The first step is to find the existing code on your site that you want to update to a new one.
- Copy the old AdSense code into your clipboard.
- Sign in to your AdSense account and visit “My Ads” tab.
- Navigate to “Ad units” option available under “Content” section.
- Click on the “Import Old ad code” link as shown in the below picture.
- On the resulting page, paste your existing ad code into the box.
- Give a name for your new AdSense unit.
- Click “Import” button to create a new AdSense unit with the exact same settings of your old unit.
- Replace the old code in your pages with the newly generated code and publish your site to see the new ads.
- Currently you need to manually replace all the existing ad codes with the new code but Google product support page indicates that in future you will be able change your old AdSense units within your account, without updating your pages.