Hacking Movable Type to Create and Integrate Advertising Posts

A few people asked me how to customize MovableType to add advertising posts on the individual archives, category pages, and main pages in MovableType powered blogs.

MovableType is fairly easy to customize, but you have to customize the different templates differently. I have been a bit slow to getting around to doing this, so sorry on that.

Opening Tips:

  • The day I changed the format of my blog to include the advertising post inline my income tripled. That is a huge deal if you participate in keyword markets where you pay per click. It may make many keywords that were once prohibitively expensive become affordable.

  • If you are unsure how to do something ask at the MovableType forums.
  • If you are changing a template make a file called something like templatename-old and save a copy of the old template before making any changes.
  • Each template that you want to change will require customizations.
  • My template is a bit hacked up from a normal install, so the code to change your layout 1 for 1, but this post aims to show the general idea of how to change your templates.
  • I do not sell MT customization services. I can offer general ideas, but I am not a template or code expert on any level.

Customizing the main page:

 

The MovableType templating system has a couple important features that make this easy to do. The three big things you need to know are:

  • lastn - how many posts you want to feature in that segment

  • including your post - easy enough, eh
  • offset - how many of the most recent posts to skip before you start posting the next set of posts

So you start your blog and you have your container and whatnot. The first thing you need to decide is how many posts you want to show above your advert. Currently I show 1.

So you start your content area, and after the div id=content you enter
<MTEntries lastn="1">

So my home page content container area starts with

<div id="container">

<div id="content">

<MTEntries lastn="1">

<$MTEntryTrackbackData$>



<div class="post">

<a name="<$MTEntryID pad="1"$>"></a>

<h2><$MTEntryTitle$></h2>

<MTDateHeader><div class="date"><$MTEntryDate format="%b"$><br /><$MTEntryDate format="%e"$></div></MTDateHeader>



<div class="entry">

<$MTEntryBody$>



<MTEntryIfExtended>

<p><a href="<$MTEntryPermalink$>#more">Continue reading "<$MTEntryTitle$>"</a></p>

</MTEntryIfExtended>

</div>



<div class="post_meta_left">

<p class="categories">Posted in: <MTEntryCategories glue=" "><a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a></MTEntryCategories></p>

<p class="post_author">by <a href="http://www.seobook.com/about.shtml">Aaron Wall</a></p>

</div>

<div class="post_meta_right">

<MTEntryIfAllowComments>

<p class="thoughts"><a href="<$MTEntryPermalink$>#start_comments">Your Thoughts?</a> [ <$MTEntryCommentCount$> ]</p>

</MTEntryIfAllowComments>

<p class="perma"><a href="<$MTEntryPermalink$>"><$MTEntryDate format="%x"$></a></p>

</div>

</div>



</MTEntries>

If you wanted 2 posts above the advert post the above would be lastn=2.

 

Advertisement or Offer Post:

 

After you create your first post you can include the advert post. I recommend creating a mini post instead of placing a huge advertisement. I probably would do better if I had an autoresponder series in a small advert post rather than my current ebook one.

To input your advertisement post you can create a backdated post and then just include that in the templating system. My post 142 is my advert post. So for me the code looks like this

<MTEntry id="142">

<div class="post">

<h2><$MTEntryTitle$></h2>

<div class="entry">

<$MTEntryBody$>

</div>

</div>

</MTEntry>

 

Remainder of Home Page:

 

After the advertisement it is time to publish the rest of the page content. So now you need to use lastn again, but this time you have to offset it. So you use code that looks something like

<MTEntries lastn="10" offset="1">

<$MTEntryTrackbackData$>



<div class="post">

<a name="<$MTEntryID pad="1"$>"></a>

<h2><$MTEntryTitle$></h2>

<MTDateHeader><div class="date"><$MTEntryDate format="%b"$><br /><$MTEntryDate format="%e"$></div></MTDateHeader>



<div class="entry">

<$MTEntryBody$>



<MTEntryIfExtended>

<p><a href="<$MTEntryPermalink$>#more">Continue reading "<$MTEntryTitle$>"</a></p>

</MTEntryIfExtended>

</div>



<div class="post_meta_left">

<p class="categories">Posted in: <MTEntryCategories glue=" "><a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a></MTEntryCategories></p>

<p class="post_author">by <a href="http://www.seobook.com/about.shtml">Aaron Wall</a></p>

</div>

<div class="post_meta_right">

<MTEntryIfAllowComments>

<p class="thoughts"><a href="<$MTEntryPermalink$>#start_comments">Your Thoughts?</a> [ <$MTEntryCommentCount$> ]</p>

</MTEntryIfAllowComments>

<p class="perma"><a href="<$MTEntryPermalink$>"><$MTEntryDate format="%x"$></a></p>

</div>

</div>



</MTEntries>

</div>

 

Individual Entry Pages:

 

I simply hard coded the ad text into the template on individual entry pages. After the post and comments section were closed I added this:

<div class="post">

<h2><!--#config timefmt="%B %d, %Y" --> <!--#echo var="DATE_LOCAL" --></h2>



<div class="entry">



<p>Ad entry text</p>

</div>

</div>

 

Server Side Includes:

 

Notice how that date of my advert uses what looks like a comment. That is actually a server side include that is used to parse the date from the local machine as being the current date. Useful to do to make your content look fresh if you are using freshness as a sales point for your software, information product, or other offer.

If you are having your site created dynamically I think you could insert that information using a php date command.

Also note that I stress the date instead of an offer. For most people the date is probably not so important, and they could probably put their post title or whatever in the H2 tag or whatever type of post heading they were using for other posts.

If you are outputting to static html files by default your server will not process server side include directives. You can set your file extensions to .shtml inside the MovableType settings, but doing that would cause you to lose whatever link equity you have built up from pages located at the old locations.

Instead, you can configure your .htaccess file so that your site processes .html or .htm files as though they were .shtml. Your .htaccess file is simply named .htaccess and exists in the root of your site. Please note that some FTP programs do not show .htaccess files, so you may want to ask your host if you have one if you can't find it.

Please note that I do not recommend screwing with your .htaccess file on an important site without supervision, as a poorly configured one can cause a site to not load at all. I have temporarily screwed up a number of my sites playing with them...but you have to learn somehow. Also, make a copy of your htaccess file before screwing with it.

Also be aware that you may already have a .htaccess file that you do not want to write over. Instead download it to your local machine. After you download the file change it from .htaccess to htaccess.txt. After whatever code is already in it you can add

AddType text/html .shtml
AddHandler server-parsed .htm
AddHandler server-parsed .html
AddHandler server-parsed .shtml

Save that file. Then change it from htaccess.txt to .htaccess and upload it to the server in the root of your site.

 

Date or Category Archives:

 

Here I just inserted the post after the opening container and content area

<MTEntry id="142">

<div class="post">

<h2><!--#config timefmt="%B %d, %Y" --> <!--#echo var="DATE_LOCAL" --></h2>

<div class="entry">

<h2><$MTEntryTitle$></h2>

<$MTEntryBody$>

</div>

</div>

</MTEntry>

If you have further questions I probably can't answer them, but I hope that helps a few people.

This Item is No Longer for Sale

Branded searches are some of the highest volume and highest value search terms. Many products or systems go out of date though.

To provide the best customer experience many websites that offered outdated products quickly remove related content. The thing is, you can't build up a billion dollar brand and then expect people to stop searching for it overnight. Many people keep on searching long after your products are no longer for sale. And because it is often hard to find information about discontinued products it is not only easy to rank for it, but people search hard for that type of information.

So if you have some content about old products don't remove it when it dates or is no longer sold. Perhaps depreciate or remove the category listings or prominent internal navigation pointing at it from your site, but still leave the page up with whatever few scraper or affiliate links it has gained over time.

Then remind the people that find those pages that the product is no longer for sale and recommend what is for sale. Do that, or maybe throw AdSense or something on it.

Also blogging about old dated stuff...I think so many people chase the right now stuff that it becomes hard to find original content when you surf from channel to channel to channel. It would be just as easy doing research or writing about old things that interest you, and perhaps looking for content sources that others are not using, like collecting junk or making 3d models of stuff.

Off Site Offsite SEO - Nuclear Waste Style

If your main site does not have a brand to the scale of BMW then maybe it is true that your site has only 1 or maybe a few lives in the search results. For your main company site it may be worth it to take the slow and steady path to the top.

If you aggressively market pages on other sites that prominently feature you then you can do it over and over again, while likely significantly lowering your risk (as compared to directly marketing your own site aggressively).

For example, looking at the Google Viagra SERPs, the SERP is about 50% spam. You got:

  • .edu subdomains

  • other subdomains of other sites
  • Yahoo! news syndication of a press release
  • humor page turned advertisement

Since Google is overtrusting root domain trust and heavily leveraging that trust when evaluating the rankings for other pages on that same site many people are simply moving all spam external to their own sites, in favor of placing it on another well trusted domain. Then some of them are creatively using aggressive link strategies to promote those pages where they are prominently featured.

For many of these types of pages the creation and redirection and link building is entirely automated. But if you take a bit longer and create something like that humor page or create a real resource page it may stick in the SERPs longer and eventually grow into a self reinforcing position.

With as wide spread as some of these off site spam activities are I would expect Google to eventually find a way to break down the domain trust scores into pieces, ie: something like only trust a page on a domain in proportion to how much link popularity from that domain flows at that page.

What held Google SERP spam back was the need for placing spam on a trusted domain. Now that many people are exploring that option the system must once again evolve.

Branded Search Results - Protecting Your Brand in Google SERP

I recently noticed I had 9 of the top 10 Google search results for [seo book]. Many brands could use help keeping their brand search results happy.

It is going to be hard to keep competing for the term [SEO], especially with guys like Matt Cutts getting links from the cooperative link exchange network. I never would have thought Matt to do something like that.

How Does Google Create Multi Link Listings?

SEO Question:

My site already ranks number 1 in Google. How do I get Google to post a mini site map in the search results?

SEO Answer:

I believe that Google primarily displays multi link listings when they feel a query has a strong chance of being navigational in nature. I think they can determine that something is navigational in nature based on linkage data and click streams. If the domain is well aligned with the term that could be another signal to consider.

If you have 10,000 legit links for a term that nobody else has more than a few dozen external citations for then odds are pretty good that your site is the official brand source for that term. I think overall relevancy as primarily determined by link reputation is the driving factor for weather or not they post mini site map links near your domain.

This site ranks for many terms, but for most of them I don't get the multi link map love. For the exceptionally navigational type terms (like seobook or seo book) I get multi links.

The mini site maps are query specific. For Aaron Wall I do not get the mini site map. Most people usually refer to the site by it's domain name instead of my name.

Google may also include subdomains in their mini sitemaps. In some cases they will list those subdomains as part of the mini site map and also list them in the regular search results as additional results.

Michael Nguyen put together a post comparing the mini site maps to Alexa traffic patterns. I think that the mini site maps may roughly resemble traffic patterns, but I think the mini links may also be associated with internal link structure.

For instance, I have a sitewide link to my sales letter page which I use the word testimonials as the anchor text. Google lists a link to the sales letter page using the word testimonials.

When I got sued the page referencing the lawsuit got tons and tons of links from many sources, which not only built up a ton of linkage data, but also sent tons of traffic to that specific page. That page was never listed on the Google mini site map, which would indicate that if they place heavy emphasis on external traffic or external linkage data either they try to smooth the data out over a significant period of time and / or they have a heavy emphasis on internal linkage.

My old site used to also list the monthly archives on the right side of each page, and the February 2004 category used to be one of the mini site map links in Google.

You should present the pages you want people to visit the most to search bots the most often as well. If you can get a few extra links to some of your most important internal pages and use smart channeling of internal linkage data then you should be able to help control which pages Google picks as being the most appropriate matches for your mini site map.

Sometimes exceptionally popular sites will get mini site map navigational links for broad queries. SEO Chat had them for the term SEO, but after they ticked off some of their lead moderators they stopped being as active and stopped getting referenced as much. The navigational links may ebb and flow like that on broad generic queries. For your official brand term it may make sense to try to get them, but for broad generic untargeted terms in competitive markets the amount of effort necessary to try to get them will likely exceed the opportunity cost for most webmasters.

How Useful is Usage Data?

Features such as toolbar search suggestions and inline query suggestion show that search engines value global usage data enough to suggest alternate routes / queries. So to some extent they must trust usage data.

On an individual page or site level basis it is much harder to tell how important usage data is because it is hard to naturally create the other quality signals without creating some usage data. Opinions are as follows:

Assuming you are doing other things right (like building a citation worthy brand that people regularly revisit) then adding usage data to your site guarantees that you will gain more of virtually every other quality signal an engine can use. Even if engines do not look at clickstreams directly, then having more traffic still helps because it expands your reach and how many quality votes you get anytime you do something that is citation worthy.

The difference between an A list and C list blogger is not just content quality or originality. Just as often it is likely due to the size of their subscriber base, which grants them the mindshare necessary to quickly spread information.

I think the Google Toolbar and SERP click-through tracking can be combined with all the other forms of tracking to give them some signal of quality. Sure it can be spoofed, but the places where it is being spoofed ... most of those places probably lack the other corroborating quality signals necessary to rank.

Remember there are user accounts too. Faking user accounts with real search and usage history over extended periods of time is much more difficult than spamming Direct Hit would have been back in the day.

When you search Google for things like VOIP some sites like Skype do not show up anywhere near the top of the search results, so you know the algorithms are much more than just usage data, but usage data could be a key component to the algorithm.

Profiting From Publishing

Great interview of Tim O'Reilly

I think that we'll find in some ways that this is the real secret of the relationship between free and non-free content. There will be so much free content that it's going to be hard to find and those who can help you find what you want will be able to charge for it - in one way or the other, whether it's through advertising or through subscription or something else. It's about managing to find "the best", and "the best" is a kind of metadata.

I still think there are many overlooked creative ways to add value to the publishing value chain. More on that in about a month ;)

2006 WebmasterWorld Pubcon Boston Pictures

I took some pictures while at the Boston.

A few pictures:
Jim Boykin celebrates his 27th birthday.
Tony Spencer had his birthday.
Joe Morin gives me clothing intervention.
Andy Hagans says thumbs up.

View the Boston Pubcon 2006 pictures.

On Being Average

On average we are all average. There is no money in average though:

Bob would fail if he did average work for average editors just to make a living. But by turning down the average stuff and insisting on standing for something on the edge, he profits. By challenging his clients to run stuff that makes them nervous (and then having them discover that it's great), he profits.

This is scary. It's really scary to turn down most (the average) of what comes your way and hold out for the remarkable opportunities. Scary to quit your job at an average company doing average work just because you know that if you stay, you'll end up just like them. Scary to go way out on an edge and intentionally make what you do unattractive to some.

Which is why it's such a great opportunity.

This is sorta like my recent porn post, except more sanitized and generally much better.

Some people are going to outragiously overpay. Why not let those people be your customers.

Rambling too Much = Bad Blogging

Ever since I started doing some of the Q&A posts I started making many of my other blog posts unnecissarily long just because I got used to it.

I felt I was doing a bit too much rambling. I was right. Not 1 but 2 friends today told me that they wanted to read what I was writing but did not because it was too long and packed too many ideas into the posts.

Short snappy posts focused on 1 topic work well if you actually want people to read them. Seth is a master at this.

Here are the problems with rambling:

  • too long and nobody reads it

  • the added content dilutes the value of each point (to readers and search engines)
  • wastes content by making 1 post instead of 5 hyper targetedc posts
  • if too many ideas are in one post it is hard for you to reference your earlier content
  • it is hard for others to reference

If you are going to be longwinded make sure it is so focused, topically relevant and interesting that it becomes the industry standard for that topic. Elsewise you are best off writing quick posts.

I wrote this more as a reminder to myself, but if you ramble and want people to read it hopefully this helps you too. Feel free to call me out if I am not following my own advice ;)

Pages