Chitika on MovableType

If you're interested in adding Chitika code to your MovableType blog, here is how I did it. First, some hat tips to Problogger.net for promoting the Chitika code and bringing it to my attention. Props to LiewCF.com as well, a WordPress-based blog that has several tips on using Chitika. I also came across a few Wordpress plugins for Chitika, which at first inspired me to write my very first MovableType plugin to handle the Chitika ad code. But then I realized it was just as easy to leverage several other Movabletype plugins along with MovableType's existing Keyword field for adding in keywords pertinent to each blog entry.

I should mention that due to Google Adsense's TOS (Terms of Service) you cannot place contextual ads on the same pages as Google Adsense. Fortunately, you can disable the contactual ad search in Chitika by adding this line of code to the Chitika javascript.

ch_non_contextual = 1;

So in order to Chitika in combination with Google Adsense you have to turn off the contextual search. But with contextual search turned off, you are forced to either "statically" define keywords to search on OR you can leverage your CMS or blogger software to automatically insert the title of the blog posts or keywords that you enter in a special field within the blogging software.

I added the Chitika code to the both the Main Template and the Individual Template and then used the <MTIfNotEmpty> plugin to determine if I added any keywords to each blog entry. If I didn't it doesn't place them in the Chitika javascript array. Another plugin I leveraged was <MTGlue> which automatically appends a delimiter(such as a comma) at the end of each item - except for the last item. This allows me to create the list of keywords separated by commas to put into the Chitika Javascript array. I also add into the Chitika array the title of the blog post <$MTEntryTitle$> as well as the Primary Category of the blog post.

If you have the MTGlue and MtIfNotEmpty plugins installed, you are good to go to use my code. Just insert the Chitika code into the appropriate MovableType templates, i.e. Individual Template, Main template, as well as the Category and Date templates if you want.

Note: I had to insert a carriage return (line feed) after </MTGlue> because otherwise the code won't wordwrap and will bleed into my skyscraper ads, since there are no spaces or line feeds to permit it to autowrap. So make sure to remove the carriage return for this to work.

<script type="text/javascript"><!--
ch_client = "tkeating";
ch_width = 468;
ch_height = 180;
ch_non_contextual = 1;
ch_nosearch = 1;
var ch_queries = new Array(
<MTIfNotEmpty var="EntryKeywords"><MTGlueContainer><MTKeyWordList>"<$MTKeyWord$>"<MTGlue>,</MTGlue>


</MTKeyWordList></MTGlueContainer></MTIfNotEmpty><MTIfNotEmpty var="EntryKeywords">,"<$MTEntryTitle$>"</MTIfNotEmpty><MTIfEmpty var="EntryKeywords">"<$MTEntryTitle$>"</MTIfEmpty>);
var ch_selected=Math.floor((Math.random()*ch_queries.length));
ch_query = ch_queries[ch_selected];
//--></script>
<script src="http://scripts.chitika.net/eminimalls/mm.js" type="text/javascript">
</script>

| 2 Comments | 1 TrackBack

Listed below are links to sites that reference Chitika on MovableType:

Chitika on MovableType TrackBack URL : http://blog.tmcnet.com/mt/mt-tb.cgi/18084

If you are MovableType user, VOIP Blog has a Chitika tip for MT user to insert non-contextual targeted Chitika ads in MovableType. ... Read More

2 Comments

Hey there, Im trying to implement non-contextual Chitika ads after my entries (right in the entry body) for targeted ads related to the entry. It works great except Chitika ignores the keyword and just goes with any other targeted ads on the page. I tried using an include module in the entry but that doesn't work either.

Does this alteration that you made work to fix this? Or can you suggest something?

thanks a lot
Shane

Chitika is great. Over the last year I compiled some statistics of my earnings and I actually earned twice as much with Chitika compared to AdSense. For those of you considering Chitika - try it! You can check out this Chitika review for some more info.

Leave a comment

Recent Activity

Today

  • Tom Keating queued The Blind Side

Sunday

Sunday

  • Tom Keating tweeted, "Moving a Data Center: Moving a data center can be fun. Yes, if you enjoy being up from 6am (Friday) to 2am (Satur... http://bit.ly/cX6L0j"
  • Tom Keating posted Moving a Data Center

Friday

  • Tom Keating tweeted, "Tearing down TMC's entire network infrastructure. My sweet beautiful network! [sniff] [sniff]"

Thursday

  • Tom Keating tweeted, "why the heck am I still awake when I have an all-nighter tomorrow moving the entire #TMCNet data center? (www.tmcnet.com) fun fun!"
  • Tom Keating tweeted, "No, Gremlins Didn't Eat TMCNet's Web Servers: Starting tomorrow around 7am, TMC will be shutting down its entire d... http://bit.ly/bS3OOn"

More...

Recent Comments

  • Mamrez: Hi guys , I'm looking for cracked MOBILELOG for iphone read more
  • Symplicity: Works amazing thanks :) read more
  • wirefly customer: I got my phone from wirefly and it turned out read more
  • Maher: Dear Sir, I am looking for a slim credit card read more
  • Nina: Yes, the ridiculous car. And Corvette it is all the read more
  • Ruth : I am sorry for ever putting U-Verse in, as all read more
  • Vijay: VOIP calls over 3G are now officially available. Just install read more
  • John: Nice work! Skype's always been lacking in the avatar stakes, read more
  • Dan Maloy: Come on, SOMEBODY'S gotta know what this music is!!!! Incredibly, read more
  • Nathan: The key is that you have to pair the BASE read more

Subscribe to Blog

Recent Entry Images

  • apple-ipad.jpg
  • google-nexus-one.jpg
  • freetalk-connect.jpg
  • freetalk-connect.jpg
  • calliflower-skype.jpg
  • itexpo-logo.jpg

Entry Archives

Around TMCnet Blogs

  • Communications and Technology Blog - Tehrani.com:
    Apple Antitrust Issues
  • On Rad's Radar?:
    Endstream Plans
  • VoIP & Gadgets Blog:
    Moving a Data Center
  • Communications and Technology Blog - Tehrani.com:
    IfByPhone Interview ITEXPO East 2010 Miami
  • First Coffee:
    Frost & Sullivan Webcast, LCEC and ENERGYprism, IDC for
  • On Rad's Radar?:
    Freeside's new CEO
  • The Readerboard:
    Tune In, Call in (And Donate), 'Hope for Haiti
  • VoIP & Gadgets Blog:
    No, Gremlins Didn't Eat TMCNet's Web Servers
  • Latest Whitepapers

    TMCnet Videos