Sunday, 8 March 2009

An Ode to OpenSource

-Akshay Ranganath

Last week, in our office, we were working on building an application that needed some graphs and charting capability. Lots of options came up, from Flash, to Silverlight, CSS, AJAX and so on. However, when the timelines got clearer, we had to look for something that was fast and already doing most of the work..

The way we went about deciding on the solution and building a small prototype was a reveleation on how entrenched open source has become – and how we have started to take it for granted. Here's the story..

Graphing

The primary requirement was generating graphs. We had options like JfreeChart, CSS based charts, some RUI components like Flash and Silverlight.

Java based tools were too heavy for us. We wanted something to plugin with Apache web server. We did not need another app server – even though they may be free. This effectively rendered most options out – and we did not have time to explore option of changing technology from LAMP stack to Java/J2EE based stack.

Enter Google Charts – Its a free HTTP API. You just send data to be charted in a pre-defined format and the Google server returns you a nice graph as a PNG image. Just embed it and behold – your site has ability to draw charts! No excel, no complicated libraries. What's more – you canconfigure many things:

  1. type of graph – bar, pie, line
  2. colors for graph
  3. scales – especially for line charts to appear nice
  4. title for graph, legends and so on
and all for free. Development time for graphs – reduced to 0!

UI
Next question was how to provide a rich UI for generating these graphs. There were lots of answers like writing our own XhttpRequest to using Yahoo UI, Jquery and so on.

Finally, we settled on Jquery. It is simple, easy and very light. Compared to Yahoo UI's MNs of size, this entire library is just one file and provides ability for:
  1. DOM manipulation
  2. AJAX calls
  3. Simple effects like hide, display, etc.
Again – cost is zero and development is 0!

Environment
Next was the question of environment. Server we'd already decided was Apache. So again, cost is zero.. (Well, I was getting good at suggestion these zero cost solutions :-)

IDE
Next came the decision of what to use as IDE. Although we could have done a bit of R&D on this, we simply chose Eclipse since the installers were already available.

Test Environment
Since we were learning Jquery and testing it, we wanted a brower that could point out any Javascript errors and in an easy to debug manner. We also wanted to do a multi browser test – just to ensure that it worked correctly. So, we got hold of Firefox and Google Chrome. Both have a very helpful JS debugger (Firebug in Firefox is every developer's dream come true!) Safari too is free so we just got hold of that too..

So finally..
The result of all these solutions was that we managed to get a small protoype taking user input, sending data to Google, getting the chart and displaying it. This entire application took just about 4 hours of development time – most of which was spent in installation of software! It was amazing that so much could be accomplished with just a plug and start model. We did not have to invest time or money in getting any of the actual functionality to work – we just focused on the business problem of getting the right data for graphing. Everything else was just open sourced!

I was amazed at how we could achieve this all – and never give it a thought. So, I just wanted to say a big “Thank you” to all the people who took pains in developing such helpful software and publish it out so that the entire world could use it for their needs.

OSS rocks!

PS: We tested our application on Ubuntu and this blog was written on OpenOffice – something I totally forgot while writing the blog.. amazing isn't it how you get used to the OS being non-Windows and OpenOffice just makes you feel so much at for MS Office users (at least for most part!)

Wednesday, 28 January 2009

Ubuntu & Chrome - Dual Attack on Microsoft?

-Akshay Ranganath

Today, I was just going through some of the popular news items on Digg and found some interesting articles.

Microsoft which has been the leader in desktop OS and the browser market (despite alternatives) is now suddenly in the midst of a dual modal attack. Until now, the competition to MS was more ideological - GNU movement that defined what is *free* but failed to provide any alternative that anyone could use.

However, with Google Chrome and Ubuntu OS, the stranglehold of MS is reducing - or so says most of the sites. Here's some interesting facts that I found:

Ubuntu

An article in NYTimes talks about Mark Shuttleworth, the founder of Canonical, the maker of the Ubuntu OS. Citing on its usage, philosophy and business model, the article says:

More than 10 million people are estimated to run Ubuntu today, and they represent a threat to Microsoft’s hegemony in developed countries and perhaps even more so in those regions catching up to the technology revolution.

The technology research firm IDC estimates that 11 percent of American businesses have systems based on Ubuntu. That said, many of the largest Ubuntu customers have cropped up in Europe, where Microsoft’s dominance has endured intense regulatory and political scrutiny.

Canonical also receives revenue from companies like Dell that ship computers with Ubuntu and work with it on software engineering projects like adding Linux-based features to laptops. All told, Canonical’s annual revenue is creeping toward $30 million, Mr. Shuttleworth said. That figure won’t worry Microsoft.

But Mr. Shuttleworth contends that $30 million a year is self-sustaining revenue, just what he needs to finance regular Ubuntu updates. And a free operating system that pays for itself, he says, could change how people view and use the software they touch everyday.

The company’s model centers on outpacing Microsoft on both price and features aimed at new markets.

Google Chrome
In a separate article on the blazingly fast development cycles of Google Chrome, an article in InternetNews.com says, "Google first released Chrome in September of 2008 and has issued 18 releases spanning both its dev and stable channels."

To top it, Google has quickly upgraded the WebKT toolkit used in rendering by the browser. But, a more serious dent to Microsoft is the creation of a Google HTTP Stack. This HTTP stack totally bypasses the Windows based WinHTTP rendering the browser mode cross-platform. Google is slowly making the browser more and more independent of the underlying platform..

Compare this with a single note on what Microsoft has been doing lately (from NYTimes ):

Microsoft had an estimated 10,000 people working on Vista, its newest desktop operating system, for five years. The result of this multibillion-dollar investment has been a product late to market and widely panned.

References

http://www.nytimes.com/2009/01/11/business/11ubuntu.html

http://www.internetnews.com/dev-news/article.php/3795366/Latest+Chrome+a+Step+Closer+to+Linux+Mac.htm

Google Chrome is now off beta

-Akshay Ranganath

As per the Google Blog dated 11th Dec, Google Chrome is now off beta.

Frankly though, I am so used to FF that Google Chrome never really registered with me. I did use it more as a fancy thing for a few days and then sort of forgot. How was it with you guys? Any ardent fans of Chrome out there?

One thing that is not clear is if users will need to reinstall the new code or if the browser automatically updates itself. I did not see anything happening to my browser at home. If Google does not support such an automated update it would be a pity since people have sort of come to expect such updates now.

As an aside, Adobe has released Adobe AIR, that lets rich internet applications (RIA) to run outside the browser.
Read more at: http://www.adobe.com/products/air/

Sun released an alternative to Flash/Flex and Silverlight called JavaFX. Read more at: http://www.sun.com/software/javafx/ . Here's a nice post that does an analysis of this new product. Sun being so late into the RIA game, the feeling is that it may not be of any use at all!

Updated after reading the comments…

Writing on the post and responding to comments, I just realized.. We has so many sites that are not cross browser compatible. If there were enough people who are not getting utilized, this could be a wonderful project to take up. It would give us an ability to:


1. Understand the complexity of cross browser support. In our project, we could estimate for anything but this one aspect. Cross browser is such a horrible beast to tame and help is relatively tough to find. Unless you've faced it and solved it, there is no help. And unfortunately, most times, there is no logic in the solution


2. Showcasing capability: By making our own sites cross browser would be a great show case to any client if they ask for our credentials in supporting multiple browsers.

Any team out there interested in this initiative :-)??

PiWik v/s Google Analytics

-Akshay Ranganath

For a particular need, I had done a comparison of Piwik versus Google Analytics as a web analytics tool. Thought of sharing the same.

Points considered in evaluation

  1. Cost / TCO
  2. Development or customization time
  3. Features needed (traffic reports v/s commerce metrics)
  4. Ease of integration to other marketing products
  5. Maturity of Analytics implemenation


Advantages of Piwik

  1. All collected data within organization - if privacy is biggest concern or if extra analysis of data necessary, this helps. Assumption is that the organization has the ability to handle the scale of data loads coming in via the analytics tools.
    GA would be a SaaS model and hence, all data is hosted on Google's data centers.
  2. Open source and hence reports can be customized. Customization though would need maturity in both understanding the reporting needs in advance as well as development team's cabapility to handle PHP based tools
    GA offers only limited customization in terms. But, it does offer a lot of minor tweaks in the name of filters but completely new reports based on user's needs may not be possible.
  3. API support for pulling in data: PiWik supports exporting reporting information. This could be used for displaying something like "Top 10 picks" etc.
    GA currently does not have this feature and data export is not possible.



Disadvantages of PiWik

  1. UI is not that great. If organization wants jazzy reporting, this is not the product.
    Commerce reporting is minimal: Piwik is good for basic reports like No of visitors, referring URLs,
  2. Search engine, Search words, etc. However, it does not appear to be strong on commerce reporting. So if the client expects a lot of reports on conversion from visitor to a customer, funnel analysis / drop out rate in a multi step buying process, this tool may not be that good.
    GA on other hand has a good set of comemerce variables. The drop out and funnel analysis via Filters is proven and has been used successfully. (It too suffers from minimal customization and this where commercial products come in)
  3. Integration with external tools is minimal. GA on account of being a Google product easily integrates with Ad-Sense and Ad-words. So for an end-to-end marketing campaign (Email marketing, search engine marketing) GA offers a good tracking. In Piwik, this does not seem to be the case. Of course it can be customized but, will clients wait for development when both products are free?
  4. On technical front- Piwik needs PHP/MySQL and a server with enough disk space. This involves an investment. Compared to absolutely free storage on GA, this is still expensive<>
  5. Reporting interval used to be fixed in old version of this product. So, reporting for any customized interval (which is available in GA) may not be available in Piwik. Also, GA offers comparison reports for two time intervals which is completely missing in Piwik.
  6. Availability of support in implementatation: Pikwik assumes that you know analytics and need only a tool. It does not offer any documentation on what is analytics and what to measure.
    GA on other hand offers lots of documentation and most importantly, paid consultants are available who can actually design the implementation strategy using the tool. For Pikwik, all you get is only the PHP based support on making the code to work - nothing on how to use the product itself.

Google updates Google Analytics solution

-Akshay Ranganath

Google recenty announce bundling of more Enterprise class features into its Analytics package (See Google Analytics blog at http://feeds.feedburner.com/~r/blogspot/tRaA/~3/428822828/more-enterprise-class-features-added-to.html)

In short, the new features added were:

  1. User Interface refresh.
  2. AdSense now integrated into GA.
  3. Advanced visualizations: Motion Charts!
  4. Custom Reports!
  5. Advanced Segmentation!!
  6. The Google Analytics API.
  7. Automatic importing of AdWords cost data into Urchin.

Of this, 6th and 7th are in private beta meaning you get it only if Google invites you to use :-(

Avinash Kaushik has written a nice post on what it means and how to use it here (http://feeds.feedburner.com/~r/OccamsRazorByAvinash/~3/428799691/google-analytics-releases-advanced-segmentation.html)

Commenting on the new features, CMS watch wrote a report on the shortcomings of the enhancements:

  • Unlike most enterprise-ready analytics tools, Google’s analytics offering lacks an ability to query against raw data, limiting in-depth analysis into segmentation behavior.
  • No API exists to support the import or export of data for third-party e-marketing package and enterprise data integration.
  • Support comes only from consulting partners, which lack the ability to make modifications on the Google back-end. And with little documentation, license-holders have come to rely on bloggers for assistance.

And it even mentioned one good thing:

businesses have come to effectively employ Google Analytics as a supplement to more robust offerings. It is especially helpful for AdWords performance metrics and campaign tuning.

(Source: http://www.cmswire.com/cms/web-content/google-analytics-shoots-for-enterprise-falls-short-001298.php)

Being stuck in project, I've not had time to see what the new features look like - planning to check it out over the weekend.

Gut feel though - Google is still catching up with the likes of Omniture. GA is still quite less customizable and the flexibiity offered in terms of user defined variable and metrics is tough to use.

Marketing campaign analysis & tracking via Google Analytics

In the world of web analytics, one of the fundamental pillars of understanding the site behaviour is through segmentation whose “is to allow your marketing/sales program to focus on the subset of prospects” (1). One of the methods of segmenting the visitors to a web site is via campaigns. It is defined in as:
A specific, defined series of activities used in marketing a new or changed product or service, or in using new marketing channels and methods (2).

To test the effectivness (and to learn) campaigns, I experimented on my personal blog. The plan was simple. I wanted to check if the readers of my blogs who come from various sources behave any differently if the reader is a friend of mine. Albeit a non-brainer thing to verify, it was an interesting thing to see how different my friends behave as target audience as compared to normal readers. So here goes the steps for setting up the campaign and the results.

Setting up the campaign
The first step in designing a campaign is to identify the goal. In my case it was to see if sending out emails whenever I publish a blog was a successful method for attracting better quality audience. A better quality audience in my case is audience who spend more time on the site and visit the site more than once.

Based on the goal, the metrics that I needed to start tracking were Visits, Absolute Unique Visits, Repeat Visits, Time on site, Pages per visit and Bounce rates. I also needed to separate visitors whom I was targeting via emails from the rest of the audience.

To segment the audience, I set up a campaign which is basically appending some special parameters at the end of URLs that can be used for tracking the visitors. To help build correct URLs for Google Analytics, Google offers a URL Builder (3) that gives a URL based on parameters that you want.

If you look at the screen, it has 4 parameters. They are:

1.Campaign source – where are the audience coming from – in case there are multiple sources
2.Campaign medium – how did they reach the site.
3.Campaign term – To see which of the multiple terms resulted the audience reaching your site. In my case there was none since it was not based on search at all.
4.Campaign content – What type of content led to audience reaching the site. It could be a text based ad on Google, a banner, a flash, etc. This can be used to identify effectiveness of multiple content types, if applicable.
5.Campaign name – A name to identify your segment of visitors

Based on this, I set of the campaign for my blog. Screen shows the campaign I setup to track visitors from this blog.
http://rakshay.blogspot.com/?utm_source=ch1&utm_medium=ch1blogs&utm_term=none&utm_content=blog&utm_campaign=collegues

Viewing the campaign
Once having setup the campaign, it was time to wait for people to start 'converting'. After sending out email about a new blog that I had written, I waited for about a month. To see the results of campaigns, go to Traffic Sources -> Campaigns.

Here you can see the results for your campaign (reported based on the 5th parameter provided above). The report can be analysed in various dimensions like the landing pages and the comparison of traffic against the entire site.

If you look at the image below, the reports very clearly show that the campaign has been a great success for the parameters that I'd defined. The average time, repeat visits and page per visit is much better than average site.

The following screen shows the performance of the various landing pages under the campaign:


The best part – since i'd sent the mail to a limited audience I can exactly calculate the marketing metric of conversion:
No of people targeted (n1) = 26
No of people converted (n2) = 13
Conversion rate = (n2) / (n1) %
= (13) / 26
= 50%
Well, considering that the average conversion from a marketing capmaign on search PPC is around 2%, the 50% I've got is nothing short of a jack-pot :-)


References:
1.Segmentation: http://www.businessplans.org/Segment.html
2.Campaign: http://www.entrepreneur.com/encyclopedia/term/82444.html
3.Google Analytics URL Builder: http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55578

The reference site for the article is my personal blog where I'd written about the funny aspects of the traditional indian arranged marriages. The URLs sent for the campaign were:

  1. Arranged Marriage Blues - Part 1: Entrapment!
  2. Arranged Marriage Blues - Part 2: The Rejection
  3. Arranged Marriage Blues - Part 3: First Meeting
  4. Arranged Marraige Blues - Part 4: Arranged Travel

Do send me your feedback on my other blog too - if you get some free time to have a look:-)

Google Chrome - A Quick Review

-Akshay Ranganath

Today, Google is launching it's new browser called "Google Chrome" as a beta in more than 100 countries. This is to be an open source browser, taking a lot from the communities of Firefox and Apple. Reasoning on the lauch, the official Google Blog says,

"We search, chat, email and collaborate in a browser. And in our spare time, we shop, bank, read news and keep in touch with friends — all using a browser. Because we spend so much time online, we began seriously thinking about what kind of browser could exist if we started from scratch and built on the best elements out there."

All this sounds correct - and good. However, but, underneath, the browser seems to be yet another appetite for Google's hunger for data. Consider this, until now, Google could track you if you were on Google Search, Blogger, Mail or one of its innumerable products. With the browser, you just don't have to be on their site. All you need is use their browser - and over a period of time, start collecting anonymous information on the browsing habits of users and fine tune the ads. Better ads, better money.

I know it is a bit paranoid that privacy may not be invaded but, if Google chose to, would it be not possible to gain this advantage?

Microsoft though should now be feeling a bit jittery - with the dominance on OS being questioned (Vista fiasco) and online document sharing sites impacting the Office dominance, the latest launch from Google must really be scaring them off!

What do you feel?

Updated on 04/09 after actually used Chrome for about 4 hours..

Why another browser?
One question on everyone's mind seems to be "Why another browser?" and "Why should Google bother about it?" Well, the answer seems to be buried in many blogs and reviews. But two things emerge:

1. Competition with MS

At a superficial level, Google wants to keep Microsoft on its toes. IE is still the market leader with more than 70% market share. Despite Firefox being popular, 13% is still a small user base. Google wants to thow its weight and push more users to the browser platform and 'disintermediate' users from the shackles of not just IE but from the clutch of Windows itself. After all when the browser can open sites like applications, users start to lose the differentiator between what's online and what's offline. So Google Documents can take over Microsoft Office and be quite nifty on any platform.

2. Switching to cloud computing

At a more depth though, Google wants to turbo charge the adoption of the cloud. As this article says:

To Google, the browser has become a weak link in the cloud system - the needle's eye through which the outputs of the company's massive data centers usually have to pass to reach the user - and as a result the browser has to be rethought, revamped, retooled, modernized. Google can't wait for Microsoft or Apple or the Mozilla Foundation to make the changes .. so Google is jump-starting the process with Chrome." Continuing on this line the author says that winning the browser war is not the strategy - it is jump starting the user adoption to a 'cloud' based mode that is the real driver behind this innovation.


A small benchmark test

Yesterday, I used the browser for almost 4 hours and came away quite impressed. Since the browser claimed to have a Javascript engine that is separe (aka Virtual machine), I loaded sites that are AJAX/JS heavy like http://g.ho.st (a web operating system) to see what happened. Firefox handled ok, IE crawled while Chrome simple dazzled. Then, I tried some (illegal) mp3 songs download. This was simply incredible. Not sure how they did it, songs of about 7 MB that would have take 2-3 minutes got downloaded in about half a minute! I am still trying to figure out if the network was somehow so good yesterday (although I dount it..)

Relief for developers

If you've executed a project where the client demands multi-browser support, I'm sure you know how hard it is to achieve. With functionality, you can somehow wrench a logic but with the browsers, it is a totally illogical and irrational trial and error that can take eons to complete.

Luckily, Chrome is based on the Apple's WebKit fore rendering the pages. So, hopefully, us developers will not be hit too hard and won't have to design one more CSS hack set for one more browser.. Yippie!

Should I use a Third party or a First party cookie

-Akshay Ranganath

In this artilce, I'd like to point out the difference between the third and first party cookies and the relative merits / demerits of both. Its based on the article by Avinash Kaushik's blog and the book "Web Analytics Demystified" by Eric Peterson. This is an important cnsideration that you should take care before starting an analytics implementation. It could determine the quality of results that you get and any privacy related headaches that may come up.

The Basics
In the world of Web Analytics, many things related to site usage is measured (generally) via cookies. According to Wikipedia a cookie is "are parcels of text sent by a server to a web client (usually a browser) and then sent back unchanged by the client each time it accesses that server". Cookies are generally of two types:

1. First party cookies
: These are the cookies that are set within the domain of the site being accessed. So, if I am using http://www.cognizant.com, a first party cookie would always be within the domain of 'cognizant.com'.

2. Third party cookies
: These are the cookies that can be set with any domain. So when accessing Cognizant, if it used Omniture for tracking would have a third party cookie set in the domain of '207.net. So in effect, a third party is a cookie that is set by a third party.

Problem with third party cookies
Generally, third party cookies are rejected by browsers (based on security settings of the browser) and most of the anti-spyware sofware.

Hence, some of the metrics that rely on cookies will be corrupt. For example, visitor measurement us dependent on the cookies. If the browsers reject them, then this metric cannot be relied upon. Note that the problem of cookie rejection is an issue with both first and third party cookies.

Another issue with the third party cookie is the visbility across domains. For example, if DoubleClick sets a cookie on http://siteno1.com would be visible even on http://siteno2.com. Such cookies are necessary for tracking ad-clicks and conversions. This is a legitimate use but, it is possible for some malacious site to set the cookie from one site and track the sites visited by the person using the browser. To avoid such problems, anti-spyware softwares strip web requests off the third party cookies.

Solution
The solution for implementing web analytics solution hence is to use rely on first party cookies. Google Analytics by default uses first party cookies. Omniture however defaults to third party cookies. You need to talk to your consultant and ensure that they switch to first party cookies and avoid getting corrupt reports.