It is very common to read on websites ''Do not modify the adsense code''  . It is also common to see new adsense publishers asking if they can modify the adsense code. It is important to note that some modifications are allow to improve your earnings and proper functioning of the code. However not all modifications are accepted.Let us get to discover some modifications allow by Google Adsens
1.Modifying adcode for SSL and  https enabled pages.

 As seen above the original code conatins http on the source script while in the second the http had been reapalced by a double slash.
Reason for modification.
This modification enable ad sense ads to show on Secure sockets layer(SSL) and Hypertext Transfer Protocol Secure (HTTPS)  sites.
Https enable ad code earn less than http adcode. it is thus necessary to enable https when your web pages are https enabled like on e-commerce sites,banking sites among others.
The new ad codes now come without http as seen on the second code. With this no modification is necessary for the code on SSLenabled sites.
2. Ad Tag minification (Removing the comment line>
There is a special article i wrote here about ad tag minifictaion.   
You can remove the comment line in your adsense adcode.
The comment in red is no longer available on the modified code.

Reason for modification
The code contain tags not accepted by w3 school.These tags are considered invalid and will not be necessary in your html code. This is one of the modifications that will prevent the parsing error message on blogger HTML editor. enable you to ad

3 . Parsing the ad sense code.( Replacing ''<'' with ''&It;'')

 We have two major modifications made here.
Replacing   ''<'' with ''&It;'' and
 ''<'' with ''&It;''   >  had been replaced with >
as seen on line one  below.
The reason for this modification are  the same as mentioned in point 2

 4.  Replacing quotes ( ''   '') with  "    tags.

 as seen above, the open quote had been replaced with "  tag     while the closing quotation had been replaced with ";   closing tag.

The reason is same as in  2 and 3.
Modification 3 and 4 can be done by using the adsense parser.

Modification 2 and 3 done with the adsense parser

5.  Modification for responsive ad units with CSS.
Adsense publishers can now modify the responsive ad unit to fit their website.
You can change the shape  to vertical or horizontal,size on screen,width and height of the ad among others. Media queries can also be used in some case to modify adsense ad codes. 

 6. Adding  type="text/javascript" to asynchronous code.
The adsense code starts like this ''
Share To:

Post A Comment:

0 comments so far,add yours

Thanks for leaving a comment on our blog. You can select Comment as: Name/URL to comment if you want to share a link.We want our comment section to be clean.
Or comment with Facebook by clicking above