Create Your Own QR Codes with Delivr.
In our last post, “QR Code Tracking for Everyone” we mentioned how easy it is to generate a QR Code using Delivr. This video produced for Ketchum (by an intern) shows how simple it is. Thank you unknown intern.
Delivr. Effortless sharing with a tricked-out, mobile-friendly URL.
USA Mobile Web Overview - Sept 2010
We compiled a compact overview of the state of the mobile Web in the USA for September 2010. Did you know that nearly 23% of mobile Web users in the US use phones that run Proprietary Operating Systems? Did you know that just under 13% of mobile Web browsing in the US is done using Non-Phones, like the Apple IPad, iPod touch, and Sony PSP?
PercentMobile on the Road to Brazil to Participate in ResultsON Week
We have been asked by our friends in São Paulo, Brazil to share PercentMobile findings in regards to global and Brazilian trends during ResultsON Week (September 21-23.)
In the meantime, here are a few metrics about mobile Web access in Brazil over WiFi:
- 15% of Brazilian visitors to sites tracked by Mobile Analytics by PercentMobile have WiFi capable phones.Updated: 14. Oct. 2010)
- 1.4% of Brazilians are browsing the mobile Web over WiFi from non-phones, Apple iPod touch leads, then comes the Apple iPad, followed by the Sony PSP gaming device. (Updated: 14. Oct. 2010)
Learn more about ResultsON Week here: http://resultson.com.br/resultson-week/
Mobile Analytics With Python, Django, ASP.NET, Java, and node.js
A few weeks ago, the PercentMobile team came to me to see if I could help write some new libraries for them. Contemporary web and mobile web sites are written on a vast array of different platforms… and obviously the more that PercentMobile supports, the better.
Something I love about programming is that there are so many languages to choose from - why restrict yourself to learning or becoming an expert at one when the same problems are also being solved in other, sometimes better, ways? Each language or platform has strengths and weaknesses of course. But I believe that understanding the differences - and more often, the similarities - makes one a better programmer.
So, generous polyglot that I am, I took the challenge, and plunged in.
Python & Django
I love Python - its readability, its libraries, and its overall philosophies. In a web server environment, Python can be used in a fairly raw way, behind a generic Web Service Gateway Interface (WSGI), but there are also a number of powerful web application frameworks using the language - most notably Django. PercentMobile want to provide painless Django support, but also to make sure that other Python server environments were not precluded.
percentmobile.py is the single file that provides everything you need.
If you are running code in a WSGI environment, you will have a handle to the WSGI environment. This is normally called environ by convention, and is passed in to your application via your top-level WSGI callable. To make the PercentMobile tracking code work, you need only make one call to the percentmobile.tracker_cookie_insert function. It returns two values: the cookie that you’ll need to set in the HTTP response headers, and the HTML that you should insert into your page.
Say, for example, you had a very simple WSGI app. This responds to requests with an HTTP 200 status code, a single header and some simple HTML:
def my_app(environ, start_response):
status = '200 OK'
response_headers = [('Content-type','text/html')]
start_response(status, response_headers)
return ["Hello world"]
To add PercentMobile tracking to this code, you need to firstly import the tracker library of course, and then call the tracker_cookie_insert function:
import percentmobile
cookie, insert = percentmobile.tracker_cookie_insert(environ, '1234555')
(Of course you should replace the final string with your own site ID!)
The cookie return value is actually a dictionary of the different parts needed to construct its string serialization. This will allow you to splice together multiple cookies, or alter the expiry time, path scope and so on. To convert the dictionary to a string, and to get the Set-Cookie header sent back in the request headers, the following code will suffice:
cookie = "%s=%s; expires=%s; path=%s" % (
cookie['name'],
cookie['value'],
cookie['expires'],
cookie['path']
)
response_headers = [('Content-type','text/html'), ('Set-Cookie', cookie)]
Finally, you need to make sure the HTML fragment, in the insert variable, gets placed in the HTML response:
return ["<html><body>Hello world %s</body></html>" % insert]
And that’s a wrap. The whole, PercentMobile-tracked WSGI application looks like this:
def my_app(environ, start_response):
cookie, insert = percentmobile.tracker_cookie_insert(environ, '1234555')
cookie = "%s=%s; expires=%s; path=%s" % (
cookie['name'],
cookie['value'],
cookie['expires'],
cookie['path']
)
status = '200 OK'
response_headers = [('Content-type','text/html'), ('Set-Cookie', cookie)]
start_response(status, response_headers)
return ["<html><body>Hello world %s</body></html>" % insert]
Pretty easy, huh? Well, not as easy as tracking an app if you’re using the amazing Django framework! Contained in the same percentmobile.py file is a class that can be used as Django middleware. It uses the same underlying function as the WSGI implementation, but also takes care of the headers and insertion for you.
Assuming you’ve placed the library file in your Python or Django path, you simply need to add two lines of code in the settings file. Firstly add the percentmobile.PercentMobileDjangoMiddleware class to your list of middleware:
MIDDLEWARE_CLASSES = (
...
'percentmobile.PercentMobileDjangoMiddleware'
)
And secondly, add your PercentMobile site ID to the settings file too:
PERCENTMOBILE_SITE_ID = '1234555'
Um… that’s it. The middleware will intercept the request, figure out the cookie that will need to be sent in the response, create the insertion code, and place it just before </body> in the response. You’re golden. I love Django.
ASP.NET: C# & VB.NET
Switching over to another world altogether, let’s take a quick look at the ASP.NET implementation of the tracking code. One of the great things about .NET is that you can choose between all sorts of different languages to write your applications and pages in. I decided to write the tracking library in C#, but you can use it declaratively in your page code, or programmatically from C#, VB.NET, or any other supported language.
The library is implemented as a User Control - that is, as a .ascx file. You need to download and add PercentMobile.ascx to your web application project.
To embed the tracking logic into a page (or probably preferably, a master page), you simply register the user control as residing in that file:
<%@ Register TagPrefix="pm" TagName="Tracker" Src="~/PercentMobile.ascx" %>
And then embed the control straight into the .aspx file contents, wherever you want it to be:
<pm:Tracker runat="server" SiteId="1234555" />
So a simple, tracked .aspx file might look something like this:
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register TagPrefix="pm" TagName="Tracker" Src="~/PercentMobile.ascx" %>
<!DOCTYPE html>
<html>
<head><title>Hello World</title></head>
<body>
<form id="form1" runat="server">
<div>Hello World</div>
<pm:Tracker runat="server" SiteId="1234555" />
</form>
</body>
</html>
To be honest, this is so simple that I would expect most people to use the control declaratively. But if, for some reason, the control needs to be inserted programmatically, that’s pretty easy too. You need to use the Reference directive, instead of Register, at the top of the file, but otherwise it’s not much harder. Here, we’re using VB.NET to programmatically achieve exactly the same result as above:
<%@ Page Language="VB" AutoEventWireup="true" %><%@ Reference Control="~/PercentMobile.ascx" %>
<script runat="server">
Private tracker As PercentMobile.Tracker
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
tracker = CType(LoadControl("~/PercentMobile.ascx"), PercentMobile.Tracker)
tracker.siteId = "1234555"
form1.Controls.Add(tracker)
End Sub
</script>
<!DOCTYPE html>
<html>
<head><title>Hello World</title></head>
<body>
<form id="form1" runat="server">
<div>Hello World</div>
</form>
</body>
</html>
(It should be fairly straightforward to see how to do this in other .NET languages - PercentMobile includes some examples in their install instructions.)
Java
Onwards. Let’s take a look at the tracking code for Java. There are numerous ways in which Java can be used for web or application server environments. To keep things simple, I decided that supporting JSP was more or less the most familiar and reusable approach.
JSP doesn’t enjoy the rich page event model that I was able to use in ASP.NET to intercept headers, write cookies, and insert HTML, all with one include. <jsp:include> is OK for adding the HTML snippets, but wouldn’t let me access the HTTP headers. <jsp:forward> does, but would only work if you weren’t planning to emit any HTML of your own after the tracking code - something of a radical assumption.
So I settled for an approach where an include directive creates an instance of an inner PercentMobile class defined within the JSP class. To cut a long story short, this means you merely add a reference to the library file at the top of the JSP file:
<%@ include file="percentmobile.jsp" %>
And then call the track method on that instance, somewhere within the page:
<%percentMobile.track("1234555");%>
The included JSP file takes care of instantiating the percentMobile object and giving it references to the request and response stream. This means it can read and write cookies, and later emit HTML. Your tracked Hello World in Java then? It’s as simple as this:
<%@ include file="percentmobile.jsp" %>
<html>
<body>
Hello World
<%percentMobile.track("1234555");%>
</body>
</html>
node.js
OK, OK. Python, ASP.NET, Java. No big deal, right? That’s all so 2003 or so, right?
Well, there’s an alternative future for web server technologies. It’s one that’s blazingly fast, lightweight, event-driven, and… where you write your server logic in Javascript.
node.js is one of the most exciting things I’ve seen for a long time, and I know I’m not alone. Fresh, fashionable, and somewhat unproven, admittedly, it’s had a lot of gushing coverage. But since it turns the web server model (almost literally) inside out, I do believe there’s something important going on.
Would it be possible to write a web app with node.js and still have it tracked by PercentMobile? My challenge.
I decided to rely on Connect, a middleware framework for node.js, which, if you are writing web applications, provides a whole host of other helpful web logic. Using Connect to create a simple node.js app is extremely easy:
var Connect = require('connect');
Connect.createServer(
function (req, res, next) {
res.simpleBody(200,
"<html><body>Hello World" +
"</body></html>",
{
"Content-Type": "text/html"
}
);
}
).listen(88);
To add PercentMobile tracking to this application firstly requires you to pull in the PercentMobile module:
var PercentMobile = require('./percentmobile');
(Where the percentmobile.js file has been placed in your node.js environment or in the common modules location.)
The module needs to be initialized as a piece of Connect middleware in the createServer function:
PercentMobile.init('1234555')
There are then two module functions, cookie and html, which both take a reference to the response object, and which return the cookie string and HTML to insert, respectively. These can be used in Connect’s simpleBody function, for example, meaning that our tracked application is as simple as this:
var Connect = require('connect');
var PercentMobile = require('./percentmobile');
Connect.createServer(
PercentMobile.init('1234555'),
function (req, res, next) {
res.simpleBody(200,
"<html><body>Hello World" +
PercentMobile.html(res) +
"</body></html>",
{
"Content-Type": "text/html",
"Set-Cookie": PercentMobile.cookie(res)
}
);
}
).listen(88);
That’s a wrap
So that’s it. A whistle-stop tour of the new languages and frameworks supported by PercentMobile. I’d love to hear your feedback on how easy (or hard!) these new APIs are to use.
And, oh… who will be the first to build a mobile web app on node.js? :-)
James Pearce is the former CTO of dotMobi and Argogroup, and has evangelized, coded, written and spoken about the mobile web and mobile development for over a decade. Find him online at http://tripleodeon.com/about
In Defense of BlackBerry…
Over the past several years, the public mobile metrics reports by AdMob (a mobile advertising network that is in the process of being acquired by Google) have been instrumental in proving the relevance of the mobile web. AdMob’s March 2010 Mobile Metrics[1] report illustrates the rise of Android OS[2], a mobile operating system open sourced by their soon to be parent company, Google. According to the report, mobile web usage of the Android OS now eclipses usage of iPhone OS in the US. While we cannot confirm this, the rise of Android OS can be supported by our own data and by the mere fact that in the first 4 months of 2010 alone, 20 new Android OS Experience Phones[3] entered the market worldwide.
PercentMobile sees US mobile Web usage very differently from Admob.
In the March 2010 AdMob Report, they state that the BlackBerry RIM OS[4] has a mobile web usage share in the US of a mere 4%. This is in a country where RIM leads in total smartphone subscribers[5], has a long standing history in the corporate world, and where its president was almost inseparable from his BlackBerry during the election media blitz. At PercentMobile, our numbers state that RIM OS represents 22% of US mobile web usage, composed of Verizon customers with a 44% share and Sprint PCS, T-Mobile and ATT with shares from 18% to 14%.
How Can This Be Explained?
There are multiple factors that can influence the numbers like the entropy of site demographics used for the analysis.
One of the most outstanding factors is that BlackBerry Internet traffic is routed through RIM’s proxy servers in Canada. AdMob mistakenly identifies this mobile web traffic as originating in Canada rather than the US. This contributes to a significant undercount of RIM OS share estimates in the US market.
Another example of the same type of misidentification occurred when we recently tried to log into Facebook from a new T-Mobile BlackBerry Bold and got a security warning that we were logging in from an unknown location and therefore could not be granted access. The next morning, we got a message from Facebook stating that somebody from Canada had tried to log into the account while we were in NYC.
In order to identify the source of a RIM OS request, a mere lookup of IP address of the request is insufficient. It is necessary to look beyond the RIM proxy in order to determine the true source network operator.
At PercentMobile, our mobile-specific business rules are designed to present you with the actual source networks of your visitors rather than the locations of service proxies such as RIM, Novarra, and Opera.
Our Findings
We come to the conclusion that iPhone OS leads mobile web usage in the USA with 48% followed by RIM OS with 22% and Android OS around 5%. We feel that it is imperative that analytics reports are as accurate as possible, and question why AdMob has not corrected their underexposure of RIM OS in the US - a terrific operating system with a large user base and significant share of the mobile Web ecosystem.
References
- http://metrics.admob.com/2010/04/march-2010-mobile-metrics-report/
- http://en.wikipedia.org/wiki/Android_operating_system
- http://analytics.percentmobile.com/public/the_rise_of_the_experience_phone
- http://en.wikipedia.org/wiki/Research_In_Motion
- http://metrics.admob.com/2010/04/45-million-us-smartphone-users-comscore/
Andrea Trasatti at WordCamp Ireland With Useful Mobile Stats for Bloggers
Mobile for Bloggers
-
5% is the average Percent Mobile audience of a Blog
-
30% of mobile traffic to blogs is via Wifi
-
30% of Mobile Web usage for blogs comes from non-phones
-
(i.e. the iPod touch, PSP, Archos, etc - expect iPads soon!)
-
-
50% of mobile devices visiting blogs are smart phones
-
90% of referral traffic to blogs comes from search engines
(Source: PercentMobile, March 2010)
WordPress on Mobile at WordCamp Ireland, Andrea Trasatti
This weekend I traveled to the beautiful Kilkenny to talk with developers and designers about mobile. Of course mobile is my bread and butter, but I thought it would be a good challenge to talk about it to people that have never worked on it or maybe still see it as a niche and something that is not SO interesting.
It took me quite a bit of time to collect all the information I needed and I wanted to be sure I was prepared to the questions that would come up. The event was about blogging and WordPress, so I thought some metrics about mobile in general and then some specific about blogs would help (thank you to PercentMobile!) me set the stage and then I dived into WordPress and plugins. In a nutshell there are a number of good plugins to create basic mobile blogs, but there is still way too little good design and there is a lot of space for innovation. Check out my presentation embedded here or on slideshare and let me know what you think.
View more presentations from Andrea Trasatti.
Don’t forget to check out WordPress Mobile Pack.
At PercentMobile We Compare Apples to Apples Like No Other Mobile Analytics Service
At PercentMobile we care about details.
We recently developed a unique approach that segments Apple iPhone Users into 3GS and 2G/3G Models, rather then into Apple iPhone OS versions that run across multiple models. We hope you find this attention to detail useful.
Meanwhile, here are some usage numbers of selected countries, compare your data against the usage numbers of selected countries below. You may find that your users represent the general trend or are very different.
% iPhone Users in Various Countries Using 3GS
- 60% of iPhone Users in Australia are 3GS
- 51% of iPhone Users in Japan are 3GS
- 48% of iPhone Users in France are 3GS
- 44% of iPhone Users in UK are 3GS
- 43% of iPhone Users in Germany are 3GS
- 41% of iPhone Users in Canada are 3GS
- 37% of iPhone Users in USA are 3GS
- 33% of iPhone Users in Brazil are 3GS
“Get a sweet free mobile analytics tool for your website - Percent Mobile. (@avinashkaushik)”
PercentMobile Takes Home the GOLD for Early Stage Innovation at the Mobile Premier Awards
600 entries to 50 nominees to 20 finalists to 1.
PercentMobile won GOLD in the category of Early Stage Innovation at the Mobile Premier Awards in Barcelona.
The Mobile Premier Awards event took place on February 15 in an unusual cold and rainy Barcelona. With over 500 attendees, 11 awards and 26 startup presentations it is was once again the great showcase of mobile innovation.
Representing PercentMobile on stage was the ever affable Alexis who won over the hearts and minds of the audience. All of us here at PercentMobile are 100% stoked*.
About the Mobile Premier Awards
The Mobile Premier Awards are the point of reference in startup premiers during the Mobile World Congress and are organized by dotopen in collaboration with some of the main networks in the industry including MobileMonday, Mobile Marketing Association (MMA), Mobile Entertainment Forum (MEF), MEX, MobileActive.org, Women 2.0 and the Women in Mobile Data Association.
*stoked. “stoked” - adjective - to be “stoked” is to be completely and intensely enthusiastic, exhilirated, or excited about something. those who are stoked all of the time know this; being stoked is the epitome of all being. when one is stoked, there is no limit to what one can do.

