- Introduction
- Key Components of a Memetic
- Summary
- Homework Assignment 13: Implementing a Memetic
- Glossary of Business and Technical Terms
Key Components of a Memetic
To implement a memetic, you need to perform two steps:
Identify a source of shareable content. Typically a page on your site containing contenteither information or interactive web applications (such as computations)that users are likely to want to share with their friends.
Implement a sharing mechanism. Typically an interactive form you put on the page containing the shareable content, which helps your users share the content with their friends.
We'll examine each step in turn.
Identify a Source of Shareable Content
First, you need to identify those pages on your site containing content that users are likely to want to share with their friendsthe shareable content. Without shareable content, the memetic simply won't work. Now, it's very important for you to make the distinction between interesting/valuable content and shareable content. There may be content on your site that users find valuable, but they won't share with their friendsthey'll keep it to themselves. For example, suppose you have a site dedicated to recipes, and you identify several great recipes that you're certain your users will love. Now, these recipes are certainly valuable; however, they're not necessarily shareable. Many cooking enthusiasts like to keep great recipes to themselvesso that they're the only ones in their circle of friends who know how to make those dishes.
If your site is based on the autonomous business model, your users should be the primary providers of content, and therefore any page on your site that displays a user contribution is a source of shareable content. The reason is that users are contributing content that they think is valuable and that they want to share with the community on your site. Thus, it's highly likely that another user will find the content valuable and want to share it with his or her friends. For example, in our sample ProfessorF site, the hacker sayings page is a good source of shareable content (see Figure 2).
Figure 2 A page that can serve as a source of shareable content on the ProfessorF site.
Users contribute hacker sayings that they'd like to share with other users. It's highly likely that another user will read a hacker saying, decide it's good, and want to share it with his or her friends. Thus, the hacker sayings page is a source of shareable content. For similar reasons, pages with bulletin boards and polls are good sources of shareable content. With a source of shareable content identified, the next step is to build the mechanism that allows your users to share this content with others.
Implement a Sharing Mechanism
The goal of the sharing mechanism is to help your users share content on your site with their friends (note the plural, friends). The more friends they share your content with, the more new users your site receives. Hopefully, these new users will then use your memetic to bring their friends to your site, and the process will continue ad infinitum. Every sharing mechanism consists of two components:
Contact gatherer. A means of getting the contact information of a user's friends or associates. On a web page, the contact gatherer is usually just a form with a text box where the user can type in his or her friends' email addresses.
Content relayer. A means of sending content to the contact(s) that a user specifies. On a web page, the content relayer is usually a script that sends email to a list of contacts provided by the user.
Setting Up the Contact Gatherer
The type of contact information you gather depends on how you want to send your site's content to a user's friends. Currently, email provides the easiest means of relaying content over the Internet, especially if that content is on a web page. However, in the future it may be just as easy to send content via instant messaging (IM), in which case the contact gatherer would gather the IM addresses of the user's friends. In this section, we'll cover the simplest contact gatherer: a form with a text box that allows users to type in the email addresses of their friends. The HTML for such a form would look like Listing 1.
Listing 1[em]Simple Form for Gathering Email Addresses
<FORM METHOD=POST ACTION="mail_content.asp"> E-mail this phrase to a friend: <INPUT TYPE=TEXT NAME=emails> <INPUT TYPE=SUBMIT VALUE="GO" ><BR> (separate multiple e-mails with a semi-colon) </FORM>
This HTML should be inserted inside the script that randomly generates a hacker saying. To keep the code uncluttered here, I won't show the entire code for that script (see Listing 9 in my Week 6 article). Notice that the form calls a script named mail_content.asp, which we have yet to write. In a browser, this contact gatherer form would look like Figure 3.
Figure 3 Form for gathering email addresses.
Next we write the script (named mail_content.asp) that emails the site content to those addresses specified in the text box. This script is part of the content relayer.
Setting Up the Content Relayer
The content relayer is deceptively complex. While it's true that its role is to relay your site's content to a user's friends, the details of how you deliver the information play a role in whether the friends visit your site. To use an analogy, a comedian may have a good joke but deliver it poorly, and the audience won't laugh. Similarly, you may have great content, but if your content relayer delivers this content "incorrectly," the recipients won't visit your site. What does it mean to deliver the content correctly, so that a user's friends are enticed to visit your site? If you're using an email memetic, you need these features:
A good From: and Subject: line. The email your memetic sends out is supposed to make recipients visit your site. However, if the recipients don't open the email in the first place, they certainly won't visit your site. One of the big reasons that email advertisements fail is that it's obvious from the email's From: and Subject: lines that the message is spam, and users just delete them. You need to your email not look like spam, so recipients will open it and get your message.
A good email message. The user may open your email, but won't visit your site unless you provide a good incentive to do so in your message. For example, suppose you have a riddle web site. You've built a memetic that allows users to email these riddles to friends. If the email includes both the riddle and the answer, the recipient doesn't have an incentive to visit your site, as you've already provided the entire riddle. What you need to do is email the question, but not the answer. More generally, you want to send the build-up but have recipients visit your site for the punch line.
Let's see how the conditions above apply to the content relayer for our hacker sayings site. A hacker saying consists of a phrase (phrase), conditions for using the phrase (usage), and examples of using the phrase (example). Suppose we've defined the variables shown in Listing 2.
Listing 2-Storing the Pieces of a Hacker Saying in Three Variables
<% ... set rs = conn.execute("select * from hackerphrase where phraseid=" & n) ... phrase = rs("phrase") usage = rs("usage") example = rs("example") %>
Instead of sending all three parts that make up a hacker saying, we send just the phrase. To send just the phrase, we first create a HIDDEN control named phrase and set its value to the phrase, <%=phrase%> (compare Listing 3 to Listing 1).
Listing 3-Storing the Hacker Phrase in a HIDDEN Control
<FORM METHOD=POST ACTION="mail_content.asp"> E-mail this phrase to a friend: <INPUT TYPE=TEXT NAME=emails> <INPUT TYPE=SUBMIT VALUE="GO" ><BR> (separate multiple e-mails with a semi-colon) <INPUT TYPE=HIDDEN NAME="phrase" VALUE="<%=phrase%>"> </FORM>
Next, we create the mailing script mail_content.asp. Before doing so, let's review just the mail script we wrote in Week 12 (see Listing 4).
Listing 4-Mail Script from Week 12, Listing 11 (sans HTML)
<% set mail=server.CreateObject("CDONTS.NEWMAIL") ' ' Set delivery parameters ' mail.from="fred@flintstone.com" mail.to ="nick.flor@verizon.net" ' ' Set message parameters ' mail.subject = "Hello" mail.body = "Dear Barney," & vbcrlf & _ vbcrlf & _ "How are you?" & vbcrlf & _ vbcrlf & _ "Fred" ' ' Send the mail ' mail.send ' ' Delete the mailing object ' set mail=nothing %>
In this mailing script, all values were hard-coded. For the memetic, we'll replace many of the hard-coded values with the values in our form in Listing 3. Before doing so, though, let's perform some basic error-checking. Specifically, we check whether the user has clicked the GO button without typing any email addresses. This basic error-checking code is bold in Listing 5.
Listing 5-Checking for Email Addresses
<% v_emails=trim(request.form("emails")) if v_emails<>"" then set mail=server.CreateObject("CDONTS.NEWMAIL") ' ' Set delivery parameters ' mail.from="fred@flintstone.com" mail.to ="nick.flor@verizon.net" ' ' Set message parameters ' mail.subject = "Hello" mail.body = "Dear Barney," & vbcrlf & _ vbcrlf & _ "How are you?" & vbcrlf & _ vbcrlf & _ "Fred" ' ' Send the mail ' mail.send ' ' Delete the mailing object ' set mail=nothing end if %>
Briefly, the textbox named emails contains the email address(es) of the user's friend(s). After using the trim function to remove any whitespace that the user may have typed before or after the email address, and then storing this value in v_emails, the code uses an if-then statement so that it only sends the email if the user typed something (v_emails is not equal to a blank string: v_emails<>"").
We can now start replacing the hard-coded values with ones from our form. First, we set the to parameter for the mailing object (mail) to v_emails. Remember that it contains the email address(es) that the user entered (see Listing 6).
Listing 6-Setting the Recipient(s)
<% v_emails=trim(request.form("emails")) if v_emails<>"" then set mail=server.CreateObject("CDONTS.NEWMAIL") ' ' Set delivery parameters ' mail.from="fred@flintstone.com" mail.to = v_emails ' ' Set message parameters ' mail.subject = "Hello" mail.body = "Dear Barney," & vbcrlf & _ vbcrlf & _ "How are you?" & vbcrlf & _ vbcrlf & _ "Fred" ' ' Send the mail ' mail.send ' ' Delete the mailing object ' set mail=nothing end if %>
Next, we need to set the from and subject parameters to values that will make the recipient want to open and read the email. First, let's consider what to do for the from line. You should always set the from parameter to a valid email addresswhich, unfortunately, suggests to most users that your email is spam. However, you can disguise the email address by putting some label in parentheses after the email address. In most mailing programs, whatever label you put between the parentheses shows up in the email's From: line. For example, if the valid email address is foo@bar.com and you want to make it seem like the email came from a friend, you can put DUDE! in parentheses after the email address: foo@bar.com (DUDE!) and set the from parameter to this value.
Next, we need to set the subject parameter to something interesting that makes the user want to open the email. Most people like opening funny things, so we'll set the subject parameter to Now this is funny (see Listing 7).
Listing 7-Specifying the from and subject Parameters
<% v_emails=trim(request.form("emails")) if v_emails<>"" then set mail=server.CreateObject("CDONTS.NEWMAIL") ' ' Set delivery parameters ' mail.from="foo@bar.com (DUDE!)" mail.to = v_emails ' ' Set message parameters ' mail.subject = "Now this is funny..." mail.body = "Dear Barney," & vbcrlf & _ vbcrlf & _ "How are you?" & vbcrlf & _ vbcrlf & _ "Fred" ' ' Send the mail ' mail.send ' ' Delete the mailing object ' set mail=nothing end if %>
If we've set good values for the from and subject parameters, the recipient will open the email message. So our next step is to persuade the recipient to visit the site, via a good message. Keep the message brief, emphasizing the value that the recipient will receive by visiting your site. Earlier, I mentioned sending the build-up but not the punch line. In terms of our hacker sayings, this amounts to sending the phrase but not the conditions for its usage and the examples of its use. Of course, you can't just sent the phrase; you need to provide some minimal context for the phrase, along with a link to your site. In terms of our hacker sayings, an example of minimal context would be something like this:
A friend thought you'd like this hacker saying: (insert saying). To see what it means, visit (insert your web site's address).
Set the mailing object's body parameter to this minimal content (see Listing 8).
Listing 8-Setting the Body Parameter
<% v_emails=trim(request.form("emails")) if v_emails<>"" then set mail=server.CreateObject("CDONTS.NEWMAIL") ' ' Set delivery parameters ' mail.from="foo@bar.com (DUDE!)" mail.to = v_emails ' ' Set message parameters ' mail.subject = "Now this is funny... " mail.body = "A friend thought you'd like this hacker saying:" & _ vbcrlf & vbcrlf & request.form("phrase") & vbcrlf & _ vbcrlf & _ "To see what it means, visit:" & vbcrlf & _ "http://www.ProfessorF.com/phrase.asp" ' ' Send the mail ' mail.send ' ' Delete the mailing object ' set mail=nothing end if %>
You're almost done. You need to end your script by sending the user back to the hacker sayings page using the response.redirect() function (see Listing 9).
Listing 9-Redirecting the User to the Hacker Sayings Page
<% v_emails=trim(request.form("emails")) if v_emails<>"" then set mail=server.CreateObject("CDONTS.NEWMAIL") ' ' Set delivery parameters ' mail.from="foo@bar.com (DUDE!)" mail.to = v_emails ' ' Set message parameters ' mail.subject = "Now this is funny... " mail.body = "A friend thought you'd like this hacker saying:" & _ vbcrlf & vbcrlf & request.form("phrase") & vbcrlf & _ vbcrlf & _ "To see what it means, visit:" & vbcrlf & _ "http://www.ProfessorF.com/phrase.asp" ' ' Send the mail ' mail.send ' ' Delete the mailing object ' set mail=nothing end if response.redirect("phrase.asp") %>
And that's the basic technology underlying an email memetic! Figure 4 shows an example of this memetic in action. After clicking the GO button, the recipient gets an email that looks similar to Figure 5.
Figure 4 User typing a friend's email address (fred@flintstone.com) in the text box.
Figure 5 Here's how the message looks.
Notice that the From: line contains the label we put in parentheses, DUDE!, and not the actual email address. Moreover, the actual email message contains only the hacker phrase and not the conditions for its use or the examples of its usage. The recipient needs to visit the ProfessorF site to get the entire hacker saying, and can get there by simply clicking the link in the email rather than typing the site's address in a browser.