HERE IS THE PROCEDURE AND COMPARISION HOW TO PARSE THE ADSENSE CODE BEFORE MAKING IT INJECTED INTO THE BLOGGERS TEMPLATE. WITHOUT CHANGING OR DOING THE MINOR EDITS, IT IS VERY DIFFICULT TO INJECT THE CODE INTO THE TEMPLATE AND MAKE IT WORK. AND DONT GET PANIC OF UR ADSENSE BEING DISABLE, BECAUSE I GOT THE PROCEDURE FROM ADSENSE DIRECTLY BY EMAIL.
Adsense answered my email with this:
Hi Kedar, We do permit minor edits to the AdSense code to place inside the blog posts. Please keep in mind publisher may not alter any portion of the code or manually change the layout of the ads. For instance, publishers may not alter the ad height variable to mask the Ads by Google moniker.
Thanks for your cooperation.
Sincerely,
Sean
The Google AdSense Team
So here is how we are going to parse the HTML to make it compatible and when viewed by using the Page Source code, it will look exactly as given to you by Adsense.
This is an example of a piece of Adsense code as given out by Adsense:
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel = "";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
AND THEN ADD THIS TEMPLATE AS POSTED IN THE NEXT POST, CLICK HERE AND SAVE THE TEMPLATE. YOUR INJECTION IS DONE FINALLY.
FOR ANY QUERIES POST UR DOUBTS IN COMMENT BOX.. THANK U
I contacted AdSense with the following question:
Subject: Wrapping Adsense code in blog post
Date: Wed, 20 July 2011 09:12 pm
I would like to put the adsense ads inside of a blog post. To make it look EXACTLY like you give it to me (when viewed as a Page source code) it is necessary for a minor alteration. For Blogger to parse the Adsense Code in XML template, the Javascript has to be escaped, using html entities...It looks EXACTLY like you gave it out when viewed by Page source, so is this permissable?
Hi Kedar, We do permit minor edits to the AdSense code to place inside the blog posts. Please keep in mind publisher may not alter any portion of the code or manually change the layout of the ads. For instance, publishers may not alter the ad height variable to mask the Ads by Google moniker.
Thanks for your cooperation.
Sincerely,
Sean
The Google AdSense Team
So here is how we are going to parse the HTML to make it compatible and when viewed by using the Page Source code, it will look exactly as given to you by Adsense.
This is an example of a piece of Adsense code as given out by Adsense:
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel = "";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel = "";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
You are going to change the (<) to (<) and the (>) to (>) and the quote marks ( " ) to (") They will all be HTML entities. The code will then look like this:
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel = "";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
AND THEN ADD THIS TEMPLATE AS POSTED IN THE NEXT POST, CLICK HERE AND SAVE THE TEMPLATE. YOUR INJECTION IS DONE FINALLY.
FOR ANY QUERIES POST UR DOUBTS IN COMMENT BOX.. THANK U
No comments:
Post a Comment