I installed and enabled this module.
I read http://drupal.org/node/121883 instructions.
But i couldn't understand how we will add adsense code snippets into the nodes?

Can you please write?
thank you.

Comments

mcurry’s picture

Perhaps an example will help. This is from one of my sites.

First, the "Top" insertion template, which is a 728x90 banner, which appears at the top of the content:
Note: the Google-provided ad unit JavaScript code is wrapped in a variety of HTML DIVs which allow us to style the content. I won't include the CSS files here, since that's specific to my site's theme. You can use inline style="..." if you like (as is done in the following example.)

Note: You must your your publisher id (example: google_ad_client = "ca-pub-1234567890123456";) and ad slot id (example: google_ad_slot = "1234567890";) as provided by Google AdSense, or you won't get the results you expect!

<div class="ai-node-body-top-banner" style="margin-bottom:1em;">

<!-- START Google AdSense Ad Unit code, provided by Google -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-1234567890123456";
/* My Ad Unit Description */
google_ad_slot = "1234567890";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- END Google AdSense Ad Unit code, provided by Google -->

</div>

Next, the "Inline" insertion template, which is a 336x280 block ad, floated right.

<div style="clear:both" id="adsense-body1" class="ai-injected-inline-right">
<div class="adsense-336x280 inline-ad-block-right">

<!-- START Google AdSense Ad Unit code, provided by Google -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-1234567890123456";
/* My Ad Unit Name */
google_ad_slot = "1234567890";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- END Google AdSense Ad Unit code, provided by Google -->

</div> <!-- class="adsense-336x280 inline-ad-block-right" -->
<div style="clear:both"></div> <!-- force full height -->
</div> <!-- class="ai-injected-inline-right" -->

So, if you can't, or don't want to, use the AdSense module's [adsense:xxx] tags (see #1397372: Fix module documentation and online help strings to remove references to AdSense module and [adsense] tags. and #1391562: 7.x README file incorrect: states AdSense module as requirement, which is no longer the case.,) you must use the JavaScript ad unit code provided by Google's AdSense interface.

mcurry’s picture

Title: How do we use this module? » Provide documentation and examples showing Google AdSense Ad Unit JavaScript Code in templates.

Copied the above examples to the module documentation.
See: HOWTO insert Google's AdSense Ad Unit JavaScript code in insertion templates.

User-contributed docs are always appreciated.

trante’s picture

@mcurry Thank you i'll check this :)

greg boggs’s picture

Status: Active » Closed (fixed)