Google AdSense and Drupal

Acert93 - August 6, 2007 - 01:50

I am setting up my first AdSense account and I have some questions as well as solicity advice on the best way to integrate AdSense into Drupal and how to best maximize my efforts. I have been fiddling with the Drupal modules called AdSense, AdSense Injector, and Google Search and have some questions about the right direction to take Drupal with AdSense, namely should I use custom blocks with the code, use these modules, or are there other options? What is the best approach with the best results in the experience of others?

1. AdSense for Content. I see there is an AdSense user contributed module for Drupal. Do people suggest using the modole /or/ manually inserting code into custom blocks? What is everyone's experience with this module?

2. Add placement. Using custom blocks and the AdSense module make it easy to place AdSense blocks on the your website. There is a module called AdSense Injector that seems to give some control, but maybe not as much as I want (?) For example, I would like to include an Advert after the first teaser on the home page, but not the 2nd, 3rd, etc. The AdSense Injector appears to support placing adverts at the end of teasers, but does it after each one, not just the first. Any suggestions to get around this?

Any general suggestions on advert placement control and "best practices" and what works best from a monetization and user experience perspective?

3. Image and Video adverts. After browsing through the AdSense module it doesn't appear, at first glance, to support all the various advert types. https://www.google.com/adsense/static/en_US/AdFormats.html Am I overlooking the option to swap text, image, and video ads? http://www.Your-Domain.com/admin/settings/adsense

4. AdSense for Search. I noticed that there are a number of user contributed Drupal modules for Google "search", namely Google Search, Google Ajax Search, and Google CSE.

By using the manual code for AdSense for Search you get a radio box to either search your site or the web and I believe searches on the web are monetized (if applicable).

Do any Drupal Google Search modules hook in with AdSense for Search?

5. AdSense for Search, "Open results within my own site". While opening in a new window is fine for me, it would be great if it could open in my site. I found a hack on the forums from Apirl, but it appears to violate AdSense TOS. Has there been any developments in this areas?

6. Google Analytics. Kind of confused on whether I should paste the script code in the advanced area or leave it blank (does the module automatically insert it into pages?). Also, my server has Urchin and Awstats enabled, so should I bother with Google Analytics? Opinions?

7. Insert Suggestion to the newb! I could use any advice and guidance others have :)

I know that is a lot of questions. It would be great if there was a detailed handbook on "Best Practices: Implimenting AdSense into Drupal" that could cover these and other questions. Drupal has sooo many modules, and sometimes overlap and competition and deprication of older modules, that it can be quite confusing at times what is the best course without first finding (!) the modules, and then testing a wide array of them. I did learn some neat stuff today, like the AdSense Drupal module allows Revenue Sharing -- which is a great feature for community oriented blog sites!

Thanks for any tips and suggestions you have on implimenting AdSense into my websites!

Joshua

Interested in seeing the

CLKeenan - August 6, 2007 - 06:33

Interested in seeing the responses... sorry to get your hopes up =P

watching this too.

vzey - August 6, 2007 - 07:32

watching this too.

Partial Answer to #3 and another question / comment

Acert93 - August 6, 2007 - 19:46

After some more fiddling around, I think I have answered half of my question in #3. In the AdSense module, under groups, there is an option for "text, image, both".

So in the AdSense module you define the markup of the advert, and in the actual code (either in the AdSense module block you are creating or AdSense Injector module code) you then select the advert dimensions. According to the AdSense module settings, the module supports:

Ad Links 4-links 120x90 120x90
Vertical Banner 120x240
Skyscraper 120x600
Button 125x125
Ad Links 4-links 160x90 160x90
Wide Skyscraper 160x600
Ad Links 4-links 180x90 180x90
Small rectangle 180x150
Small Square 200x200
Half Banner 234x60
Square 250x250
Medium Rectangle 300x250
Large Rectangle 336x280
Banner Ad Links 4-links 468x15
Banner 468x60
Wide Banner Ad Links 4-links 728x15
Leaderboard 728x90

So no video adverts, but that is how you would go about using text or image (or a mix) adverts at the various dimensions.

Question #8. I have noticed Google adverts that note, "Click here if you wish to advertise on this site". How do you do this? (I started fiddling with adverts because we began getting requests by specific advertisers to advertise on my site and was pretty sure AdSense supported this feature).

Btw, I have been using the AdSense module the last 3 days and must say it is pretty helpful. It doesn't appear to do much more than what manually pasting code into pages does, but it is helpful once you get it setup to reduce redundancy. It also hooks with the AdSense Injector which I am now using to insert a small advert at the bottom of pages and blogs right before comments. I do wish the AdSense Injector had different "templates" for the various page types, as well as more fine grained control on what teasers (1st, but no others; not on 1st-3rd teaser, but on ever other teaser after, etc) but it is definately helpful to inject adverts on your old pages.

Double post, sorry.

Acert93 - August 6, 2007 - 20:31

Double post, sorry.

Subscribing

kwgossett - February 19, 2008 - 07:17

subscribing

Another question and comment...

Acert93 - August 6, 2007 - 19:44

Question #8. I have noticed Google adverts that note, "Click here if you wish to advertise on this site". How do you do this? (I started fiddling with adverts because we began getting requests by specific advertisers to advertise on my site and was pretty sure AdSense supported this feature).

Btw, I have been using the AdSense module the last 3 days and must say it is pretty helpful. It doesn't appear to do much more than what manually pasting code into pages does, but it is helpful once you get it setup to reduce redundancy. It also hooks with the AdSense Injector which I am now using to insert a small advert at the bottom of pages and blogs right before comments. I do wish the AdSense Injector had different "templates" for the various page types, as well as more fine grained control on what teasers (1st, but no others; not on 1st-3rd teaser, but on ever other teaser after, etc) but it is definately helpful to inject adverts on your old pages.

Google services and Drupal

Drupalace - August 27, 2007 - 03:00

Acert93,

I, too, am very interested in best ways to integrate Google AdSense, search, and other services into Drupal sites.

I don't have answers to many of your questions, but a few quick comments:

#1: You know this by now, but for anyone else passing by: Yes, there's an AdSense module for Drupal, and it's worked fine for me. The module makes it very easy to configure and place a new ad block in a sidebar. There's also AdSense Injector for placing ads into node text, though I haven't used that yet.
http://drupal.org/project/adsense
http://drupal.org/project/adsense_injector

#4: I've placed Google search blocks on sites manually, using code from Google (both for the block and for the node that returns search results). I'm not aware of a Drupal module that creates the same thing automatically.

However, I have a problem w/ the search. It took a tweak (found on the forums here) to get things working at all, and I still only have ability to search my own sites; the option to search the entire web isn't working for me at all.

If anyone has an interest in (or solution to?!) the issue, I've written it up here:
http://www.drupalace.com/blog_entry_its_always_something_google_web_sear...

#6: Is there any reason at all for pasting code, instead of using the Google Analytics module? The module works great, as far as I can tell.
http://drupal.org/project/google_analytics

--------
A site by, of, and for the Drupal newbie: http://www.drupalace.com

Hey guys. Just wondering if

elknight - January 16, 2008 - 11:37

Hey guys.

Just wondering if there's a module to inject adbrite/bidvertiser
ads as nodes, instead of only google adsense as in the case
of the adsense injector.

Would be great if we could have the ability to inject html/javascript
automatically into the cms as nodes. Adsense injector is great but
only supports adsense and some of us do not have adsense. :(

TIA.

Regarding #4

aruns4 - September 21, 2008 - 08:47

http://www.befolks.com

u said in #4 that u were able to place code for google search manually both for blocks and the node that returns..

how u did that?
did u pasted that code in page.tpl r any?

pls say me..

Just a block and a Page

Drupalace - September 22, 2008 - 02:15

No, I didn't do anything so complex as tinkering with source files. Just a simple procedure:

When you set up a Search for Google instance, Google returns two pieces of code: one for the search box, one for the results form.

I created a new block, and pasted in the first piece of code.

I created a Page node, and pasted in the second piece of code. (I imagine that a Story node, Blog Entry node, etc. would also work; Page just seemed appropriate for me.)

You just have to watch out for details. For example, I believe you need to decide the results page path (like "/search_results") before requesting the code, and you have to make sure you later give the results page that same path when you create it. Also, be sure that both the block and the Page are created using an appropriate input format for code (like PHP input) - i.e., one that won't muck up the code.

Finally, note that I needed to manually tweak the Google search code before it would work right for me; I don't know to what degree other people have that same issue. See my link above, plus:
http://www.drupalace.com/blog_entry_fixed_google_web_search_block_2007_0...

--------
Easy Drupal Admin Manual, Drupal questions, other stuff for the newbie: http://www.drupalace.com

just subscribing to this

drupalfool - February 19, 2008 - 10:55

just subscribing to this thread to watch it.

*^*

pnlnl - February 19, 2008 - 15:23

well if anyone is interested, i tried the different ad modules and i wasn't satisfied at all with them, well here is some more detail:
-adsense:
pros:
-easily theme the ads and change the colors according to your needs
-add ads in a flash
cons
-creates a bulk of block(a list of 10) that are added to your blocks admin page, this may be annoying
-works only in blocks
-adds an(usually) unwanted tab to your users profiles ps: there is a process to hide it but i dislike the idea
-no support for referral ads
-adsense injector
depends on the adsense module
it dramatically enhances its functionnality by allowing the injection of ads in nodes with good control over this
it offers some extra features
but you will still suffer from the cons of the adsense module
i can't talk about the cons of this module, because it is a helper module not a stand-alone.
-advertisement
it is a general ad module
many nifty and nice features that's not i am going to use
it lacks the pros of the adsense module
it lacks a feature or a helper module to allow automatic injection
concisely, if you're looking for a general ad solution, this may be the trick for you, but if you're just looking for smth to deal with adsense, i do not recommend it
ps: it suffers from all the extraneous blocks that you won't use unless you have a considerably large and trafficed site

mixing them all: this allows you to accomplish several things but
you should consider memory limit and bulkier bulk of extraneous blocks

the way that i chose:
custom theming and using blocks
pros:
you can always use your adsense account to manage theming.
less extraneous stuff
more control
cons:
-lacks injection inside your content(in the middle)
but i say that i dislike having ads in the middle of a content, i despise sites that do this(heck i stopped going to famous sites because of this), i think that a well placed ad is the key for success for example if someone is visiting your site to read an article, he is interested by the article so he will go on reading and ignore the ads in the middle, finally when he will finish reading, there will be a split second where he will think what to do next, so here a well placed ad at the end can capture his attention...
-gets harder when you want to do more complex things
but this way we will be pushed to learn more, better than always relying on others...

tip: having a theme with many regions can be helpful, so if you are building a new site, consider using one...

subscribing __________ http:/

marafa - March 3, 2008 - 05:40

subscribing
__________
http://namima.in-egypt.net اجدد اخبار ممثلين

subscribing

j0hn-smith - March 3, 2008 - 08:58

subscribing

True.. setup a block to get it done on Drupal 6x

abelleba - June 29, 2008 - 10:50

I agree with pnlnl. I wrote down detailed instructions on how to get this done for people here: http://computerquestionhelp.com/blogs/Misc/getting-google-adsense-to-eas...

Good luck all.

 
 

Drupal is a registered trademark of Dries Buytaert.