Closed (fixed)
Project:
Content Injector (formerly AdSense Injector)
Version:
7.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Jan 2012 at 20:49 UTC
Updated:
4 Aug 2013 at 21:44 UTC
Comments
Comment #1
mcurry commentedPerhaps 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!Next, the "Inline" insertion template, which is a 336x280 block ad, floated 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.
Comment #2
mcurry commentedCopied 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.
Comment #3
trante commented@mcurry Thank you i'll check this :)
Comment #4
greg boggs