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.
To find out more about 51Degrees.mobi Framework, how it supports all mobile devices and increases the performance of web applications click here.
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 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 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.
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?
Use the Page.aspx file contained in this SourceCode.zip can be used to retrieve the MobileNumber or email address.
When 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.
- 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 = 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.
The source code referred to in this blog can be downloaded here and is free to use with 51Degrees.mobi Framework.
For more information about Mobile Profile read this chapter from our Developers Guide.