I have been using Mango blog now for about 3 months on this site and I have been using it on a internal company site for a little over a year. Mango blog is continuing to blossom into a great coldfusion blog engine that is extremely easy to skin, Laura at AsFusion is doing a great job!
Recently I wanted to add ads to my blog to try and monitize it a little bit (aka extra cash). I originally thought about adding a plugin to Mango blog’s admin section, but realized one I don’t have a great understanding of the framework and two I wanted a quick way to add Google AdSense and Amazon ads to my site.
The second option relates directly to you know what, faster time to market – exactly! So once I implemented both ad options using the standard copy/paste procedure and adding more junk in my mango skin I decided that I wanted to make it more reusable and clean it up a little. You never know, the code could indeed become handy in the near future and honestly I like to keep things nice a neat.
So instead of going the plugin route I decided on a easier approach, I created four custom tags each one handles a piece of the ads on this blog:
- AdSense.cfm
- AdSearch.cfm
- AmazonDeals.cfm (In-Work)
- AmazonOmakase.cfm
The first two tags handle the Google side of my ads, AdSense handles all my text based ads, while AdSearch adds the Google Search capabilit to my site while additionally helping me monitize from my Blog. The second two tags are for Amazon. AmazonDeals is currently in work, it’s a flash based widget and I am still working on generalizing the code so its more tag friendly (stay tuned for an update). The AmazonOmakase tag shows two products in a horizontal fashion.These tags are not very difficult to use and can be adapted to suite your own ad requirment once you get the google code, amazon ad code or any other ad code for that matter. Below is a couple things you want to do before implementing the tags on your mango powered blog site:
1. In the root of your mango blog, under the tag folder create a new folder called custom
2. Drop the custom tags in this custom folder
3. Now on any of your mango skin templates add the following snipet of code at the top of the page:
<cfimport prefix="custom" taglib="../../tags/custom">
4. In order to use the tags simply add the following code to the appropriate place in your skin template page:
<!--- ads by google adsense custom tag (large banner version)--->
<custom:AdSense adclient="pub-yourclientID" adslot="yourslotID" adheight="60" adwidth="468"/><!--- ads by google adsense custom tag (small text version)--->
<custom:AdSense
adclient="pub-yourclientID"
adslot="yourslodID
adheight="100"
adwidth="135"/><!---Amazon Deals Custom Tag (not yet finished
– wont be in the download below)--->
<custom:AmazonDeals /><!--- search by google custom tag --->
<custom:AdSearch
adclient="pub-yourclientID"
addomain="yourdomain.com" /><!---Amazon Omakase Custom Tag --->
<custom:AmazonOmakase amazon_ad_tag="youramazonAdTag"
amazon_ad_width="468"
amazon_ad_height="60"
amazon_color_link="E7A21B" />
5. You will need to apply for your own AdSense account, as well as a Amazon Associate (affiliate program) account before you can begin, you can also create your own type of adds using there tools and just copy and paste in the code over the script code in the tags and make the appropriate coldfusion attribute changes.
Good luck and I hope you find this useful!
Download tags
#1 by Laura - January 5, 2008 at 12:12 AM
Thank you for taking the time to create these tags!
I think you took the best route. Even if you created a plugin to handle the preferences (ie: the affiliate ids, the colors, etc), you would probably need to combine it with custom tags in order to add it to the skin. You could make the plugin add it to the rendered page, but there are only a few predefined places where that can occur, and it may not fit well in your skin. If you had a plugin you could also use the <Event> tag to make the plugin insert the custom html or javascript, but that will also mean adding extra things to the skin. So either way I think the user needs to add something to the skins. Maybe I can create "josh's tags"-friendly skins that put the adds in places where it knows the will look fine.
By the way, I like the idea of having a "custom" folder in the tags folder. If that folder already existed and the <import> code already came already in the skins, then it would be easier for people to just drop new tags there and use them right away.
#2 by Josh - January 5, 2008 at 2:44 PM
Mango lets me add the tags very easily. Hopefully I will have time tomorrow to finish the Amazon Deals tag, its a flash tag and the URL that embeds your Amazon ID is really messy and long so I will need to play with that one or just leave it be.
C ya,
Josh
#3 by Anthony - February 3, 2008 at 6:08 PM
Is that possible?
Thanks.
#4 by Josh - February 3, 2008 at 8:15 PM
This particular tag wont allow that, however I am working on a plugin that will. If I can get enough freetime I will finish it this week. Look for the post called MonitizeMe in the near future.
In the meantime you could use the tag w/in your skin (index.cfm) to have it display when the page breaks and do a random tag call to either the amazon or ad sense tags. Which would display the tag after the post snippet.
The plugin idea, would allow you to place the add w/in the post itself, w/o having to modify your skin templates. I like the plugin idea better myself which is why I am working on it. The tags have there advantages though as well, b/c you can place them in your navigation section or at the bottom/top of your pages. They arent as flexible when it comes to post content though.
#5 by Anthony - February 4, 2008 at 10:22 AM
Can't wait to see it.
Seeing as you're another user using Adsense on their blog, do you find that through the use of Mango blog's tags, adsense has trouble generating ads for it? All my ads have to do with RSS feeds and Blogs when my site is mainly about animations, videos, and funny images. Just wondering what your experience has been so far. Will definitely keep an eye out on your site.
Adios,
Anthony
#6 by Joshua - February 12, 2008 at 2:41 PM
#7 by Mark Aplet - September 6, 2008 at 8:49 PM
#8 by David - December 11, 2008 at 10:10 PM
thanks for the great plugins! I'm new to adsense, but had a quick question. I'm getting multiple instances of my ads on my blog. Instead of getting on 120px X 600px ad, i'm getting 2 or 3 120px X 600px ads. you can see it in action here: http://paulorfalea.com/new/blog/archives.cfm/date/2008/12. Any idea why that would be? I created 3 different ads, just make sure that it wasn't the creation of the ad that was messing things up. Any suggestions would be greatly apprecitated! Also, you haven't found anyway to set comments to unapproved by default in Mango blog have you?
thanks,
David
#9 by Custom banner - June 24, 2009 at 10:06 PM
#10 by Allison - August 28, 2009 at 12:15 AM
#11 by seo compnay - September 1, 2009 at 12:12 AM
#12 by stop snoring - November 4, 2009 at 10:14 PM
#13 by seattle family law lawyer - November 27, 2009 at 11:54 PM
#14 by hummer hire birmingham - November 30, 2009 at 8:48 PM
Regards
#15 by Spa Parts - December 17, 2009 at 9:43 PM
Regards
Angela
#16 by HVAC Baltimore - February 2, 2010 at 3:04 AM
Regards
Anthony
#17 by Landscaper Raleigh - February 2, 2010 at 4:00 AM
Regards
Andrea
#18 by n - February 16, 2010 at 12:11 PM
#19 by muhammad waqas 19883 - February 18, 2011 at 8:30 AM