An Increasing Problem
Ensuring customers can easily read and act on the content sent to them via email or text message is becoming increasingly important to businesses. According to our Mobile Analytics service 7.2% of all web requests in the United States in May 2011 were from mobile phones or tablets. An email designed for a desktop or laptop email client such as Outlook, or a browser based e-mail service like Hotmail or Gmail won't look very nice when viewed on the small screen of even the most high end smartphone. There's simply too much content, pictures and links.
51Degrees.mobi Framework can detect the type of device a web page is being opened on and tailor the content appropriately for the screen size and input method. This blog post shows how to link text and email messages to 51Degrees.mobi, including all the code and tools needed to integrate a bulk SMS service or eMail marketing product to your mobile web site or application in minutes.
Push Text Messages
It's 4pm and so far today I've received 23 push messages. 2 were via text message and the remaining 21 via email. All are from individuals or businesses I've asked to keep me updated. All want to know if I've read their message. They do this by tracking unique links contained within the text message.
Mobile Profile contained within 51Degrees.mobi is used for tracking interactions with a web site across multiple sessions, devices and messages. Mobile Profile can be used with links contained in email messages or SMS messages to track interactions.
Use the CreateTextMessages.aspx file contained in this SourceCode.zip file (file no longer available) to add the following functionality to your web site. Simply copy it into your mobile web application.
Step 1 – Open the web page from a browser on the web server and the first screen enables lists of mobile numbers to be pasted into a text box.
Step 2 – Press Preview and the second screen displays the numbers alongside a text message containing a unique link.
Step 3 – Pressing Download as CSV file results in a CSV file ready to upload to your favourite text message push provider.
Note: It won't work from a remote browser unless you change the Page_PreRender event handler.
Push Email Messages
A few simple modifications are needed to output links for email addresses. Use the CreateEmailIDs.aspx file contained in this SourceCode.zip file (file no longer available) to add the following functionality to your web site.
Step 1 – Open the web page from a browser on the web server and the first screen enables lists of email addresses to be pasted into a text box.
Step 2 – Press Preview and the second screen displays the email addresses alongside a unique Mobile Profile ID.
Step 3 – Pressing Download as CSV file results in a CSV file ready to upload to a bulk email provider.
The email provider will need to insert the Mobile Profile ID as a segment in the URL, or as a query string parameter 51DP. The following examples will all enable the mobile web site to detect the correct Mobile Profile ID.
- http://example.com/[MobileProfileID]/
- http://example.com?51DP=[MobileProfileID]
- http://example.com/folder/[MobileProfileID]/page.aspx
- http://example.com/folder/page.aspx?51DP=[MobileProfileID]
Opening the Link
In the previous two sections I showed how to create a list for input into a push text message or email platform. What happens when the link is opened?
The Page.aspx file contained in the SourceCode.zip file below can be used to retrieve the MobileNumber or email address.
SourceCode.zipWhen opened with a valid Mobile Profile ID in the URL either the email address or mobile number associated with the ID in the previous section will be displayed. Try using a link you created earlier with Page.aspx and see what happens. The following two screens show the email address or mobile number being retrieved from the Mobile Profile depending on which method was used when the Mobile Profile ID as created.
What about the Original E-Mail Message?
In the previous 3 sections I've shown you how to create links, IDs and then retrieve relevant information when the associated link is opened. Mobile web applications accessed in this way won't need to ask users to enter fiddly email addresses, or mobile number as the web site will already know this information because it was used to generate the original links.
So far we've not looked at how to format an email message for display on a mobile device. There isn't a silver bullet to this problem because email clients have no intelligence. They won't run javascript, and don't even have access the internet when the message is initially displayed. However there are some simple things we do to improve the situation.
- Use previous link opening history to determine the type of device used to open the link from. Next time a message is sent create one that is appropriate for the device. The following line of code could be used to store the type of device in the MobileProfile when the link is first opened.
MobileProfile["Link IsMobile">] = Request.Browser.IsMobileDevice;>
- Less is more. Favour a simple generic message that will format well on both mobile and non-mobile devices. Use this message when the type of device determined in the previous step is unknown. Create 2 other message formats specifically for mobile and non-mobile devices for use when the device type is known.
- If the message content is subscribed to and the user is prepared to provide preferences ask them what type of message they'd like to receive.
- Treat email like a text message or twitter tweet and simply ask the user to go on-line by clicking a single link to read the message.
Whatever options you choose one thing is for certain, with mobile devices becoming the preferred method of internet access you won't be able to do nothing for long.