Charudatta Wad

Posts written by Charudatta Wad

May 11

Metric of the Month May: Using Content Management Systems for Data and Analytics

Intro to Post Click performance tagging:
Post Click performance measures the actions a user takes after entering a site via paid placement such as a banner ad or paid search term. Evaluating the connection between user behavior and which ads or ad locations (such as a particular partner site) helps optimize ongoing marketing by assigning value to those visitors. We can determine value by setting up measurement campaigns surrounding those click-through visitors, watching their drop-out rates and comparing them to successful conversion. Post Click measurement allows effective performance evaluation on individual ad campaigns.

Post Click performance tagging usually involves adding an image to your page. This image (1×1 pixel) uses the SRC attribute, a descriptor telling a visitor’s browser where to retrieve a file, to collect information about the users arriving to the site through an online advertisement. This is typically done by adding a string of campaign-specific identifiers in the space after the URL left for setting variable values (the stuff after the “?” in your browser’s location bar).

However, if there are numerous campaigns running through different timelines on your website, adding (and removing) the image code from the site is very tedious. The effort is exponential if the website is still under development and requires you to back up the production release code, add the image tracking code to each page and re-deploy!! The less dynamic your Post Click tagging scheme, the greater the effort to keep it current.

A great work around to the constant extra work to keep things current during deployments and post development is to use your content management system to store the tags (the image SRC and its URL variables) and use a general library to add an image node to the corresponding page document if a tag is configured to appear on that page.  This elegant solution eliminates the need for re-deployment every time new tags are added.

Anatomy of the image tag:
Post Click performance image code looks similar to this, in which we have a simple conversion funnel of visitors landing on index.html and successfully converting once they have visited StoreFront.html:

In index.html:
<img style=”border: 0pt none; height: 1px; width: 1px;” src=”serverName&amp;tagId=31354″ alt=”" />

In StoreFront.html
<img style=”border: 0pt none ; height: 1px; width: 1px;” src=”serverName&tagId=24395″/>

If you look closely only the tagId changes for each page and the rest of the image properties remain the same.

Content Management solution:
1) Using the CMS to store the tag Id. There are two ways this can be achieved:

a. Creating a page attribute (call it analyticsTagId) and assign it the tagId: This is better from the point of view of performance. It is however a bit more difficult to manage; the content owner has to remove the tags when the campaign is over. There is no central place to view all the current tags.

b. Create a separate CMS page, which maintains a Map of pages and their tagIds: This takes a bit of performance hit (which can be overcome by caching) and presents one central place to manage all of your tags.

Once the CMS has the tags, the business objects in the code will need to check for a tag on a given page and call a JavaScript function if that tag exists.

2) Write a JavaScript function that takes tagId as a parameter and adds an Image to the DOM. Using JQuery, this function can look like this:

function AddTags(tagId){

if(tagId!=”null”)

{

var source;

if(document.location.protocol == “http:”){

source = document.location.protocol +”//adserver &tagID=”+tagId;

}else{

source = document.location.protocol +”//adserver&tagID=”+tagId;

}


//create the image node and append it to body
$(‘<img/>’).css({height: ’1px’,width:’1px’,border:0}).attr(‘src’,source).appendTo(‘body’);
}
}


That’s it!

This will give you a very strong and adaptive framework to add/remove your Post Click performance campaign codes from your website without actually deploying your code.

Notes:
1) If your ad serving code is in an iframe format, it will still follow the same steps,but instead of creating an image node, create a div and place your iframe in it.

Sample js code:

function createIframeTag(src){

var axel = Math.random()+"";

var a = axel * 10000000000000;

src = src.replace("RAND", a);

$('<div/>').attr('id', 'tagDiv').appendTo('body');

$("#tagDiv").html('<IFRAME SRC='+document.location.protocol+src+' WIDTH=1 HEIGHT=1 FRAMEBORDER=0></IFRAME>');

}

2) If there are more than one parameters that differ in two instances of an image code, use a dummy separator in the CMS (ex: @@) and then use js to replace it.
3) This framework is very well suited for web analytics code. The page attribute will now contain the name of the page, any special event that needs to be recorded, segmentation details and so on.

April 22

Google Analytics APIs Launched

Google announced the launch of its Google Analytics Data Export APIs (beta) today. It was anticipated for a long time. Analytics API is a Google data API (same as Google calender API). APIs currently support Java and JavaScript (details on the Google Analytics Blog).

So what does this mean to Google analytics users?

  • You can access Google Analytics on your desktop (using Adobe AIR or Google Desktop). Desktop reporting is one such application.
  • You can access specific reports on your iphone or Android powered phones. Few other cool applications can be found here.
  • The most important impact is that you can mash-up your data. You can marry your web analytics data with your offline data (Sales, CRM), create custom dashboards or new visualizations. Web analytics reports can be combined with data from other sources to create even more accurate predictive models and study online-offline user behaviours. You can now track your multi-channel campaigns more effectively.

Other web analytics vendors (like Omniture) already provide this functionality but Google Analytics is the first big player to do it for free (a lot of $$$ savings). Piwik (open source web analytics solution) enables you to own your analytcs data by hosting it in-house, but with these new APIs, you can save yourself the hassle of maintaining the analytics server and import the data.

October 15

Blog Action Day: October 15th

Today is Blog Action Day! . This years topic is poverty. Bloggers all around the world will make an effort to talk about one issue and try to raise awareness. With the current financial meltdown, if you think dark days are ahead of you, may be you are not as unlucky as you think!

Today’s world is exciting, we are making progress on various fronts but today’s world is also unequal. Almost half of the world (over 3 billion people) live on less than $2.50/day and almost 80% live on less than $10/day.

Here are some of the statistics published by UN and UNICEF:
1) According to UNICEF, 26,500-30,000 children die each day due to poverty. Most of them die out of diseases like Malaria, diarrhoea and other diseases which are eradicated from the developed worlds year ago.
2) Around 27-28 percent of all children in developing countries are estimated to be underweight or stunted.
3) Less than one percent of what the world spent every year on weapons was needed to put every child in school.
4) Water problems affect nearly half of the human race. Some 1.1 billion people in developing countries have inadequate access to water, and 2.6 billion lack basic sanitation.

Is poverty just a number game? Obviously not, its about men and women unable to fulfill their basic necessities and failing to achieving their true potential.
So, the question is what is lacking? the answer is simple: awareness.

I would like to take this opportunity to talk about two of my favorite charitable organizations:
1) MSF’s Doctors Without Borders is an international medical humanitarian organization working in nearly 60 countries to assist people whose survival is threatened by violence, neglect, or catastrophe.

2) Project Rs. 10000: Project Rs. 10000 is a simple initiative to help fund-raising for noble causes in India. The project is divided in to several chapters, with the goal being to help various NGO’s in the country to help generate money through different sources. The goal of each chapter is to raise Rs. 10, 000 (~$210) and donate it to a charitable cause of your choice. I will be working on a pro bono project in month’s time of making a website for the project.

There is an old Buddhist saying: “If you light a lamp for somebody, it will also brighten your path.”

We cannot change the situation overnight, but we can atleast start today! Lets spread the word.

References:
1) http://www.globalissues.org/article/26/poverty-facts-and-stats
2) http://unstats.un.org/unsd/methods/poverty/default.htm

September 15

Testing UI using Selenium IDE and RC

On my current project, every change is accompanied by a long and tedious regression testing. Most of it is testing the JavaScript validation and the UI. This usually involves 100,000 clicks on different browsers!!

I was always looking for a chance to play with Selenium IDE and this was the perfect opportunity. Selenium is a suite of test tools to automate web app testing. There are usually two types of scenarios you would like to test:
1) Checking the style of the page
2) Validating if certain actions result in particular content on the page

Selenium offers three different tools to accomplish UI testing :

1) Selenium IDE : is a firefox plugin that records your activity and converts it to a Selenium test!! IDE can also convert your test in various programming languages that you can use with RC. The only disadvantage is it does not allow multi browser testing. Check out the intro video here

2) Selenium Remote Control: allows you to automate testing using different browsers in a programming language of your choice (Java, C#, PHP, Ruby, Python are supported). RC requires a server which acts as http proxy and launches browsers against any http website. You can use local-host as the RC server. The best way is to create your test scenarios using IDE and add a test case in RC code.

I have created a simple project for Selenium testing using C#. The source code can be checked out here. This can be used as a good starting point to add more complex testing scenarios.

3) Selenium Grid: allows you to scale out testing using multiple servers.

Selenium is perfect for testing Ajax apps and can be easily incorporated in a Continuous Integration System. Selenium cannot test Flash interactions (as expected).

Happy Testing!!

June 2

Molecular at Google I/O

Google’s largest developer event  had attendees coming from all over the world. The overwhelming response from the developer community resulted in delayed start for the keynote. The keynote was delivered by Vic Gundotra, Vice President, Engineering. He started off by asking all the right questions. Some of the highlights are:

  • As web applications get more complex and interactive, why should developers suffer from poor standards that browsers follow?
  • How can we unlock the O.S capabilities to make our applications run faster?
  • What is Google doing to improve the scenario using Gears (i.e helping in setting the HTML 5 standards).
  • Web 2.0/2.5/3.0 is not just about pretty interfaces but good engineered applications that are fast and fluid.

He touched three main parts of web Client, Connectivity and Cloud.

  1. Making Client more powerful: Enabling more operations on the client side with multi-threaded operations and local storage.
  2. Making Conectivity more pervasive: Making sophisticated applications available on mobile devices through Android.
  3. Making Cloud accessible: Increasing the ease of deploying web applications using Google’s AppEngine.

Other announcements:

  1. Opensocial 0.8 released.
  2. Google AppEngine: Memcache and Image Manipulation API released
  3. GWT 1.5 released

There were various updates on the individual tracks such as OpenSocial, Android, Gears (Google debranded Gears), GWT, Ajax APIs, Google Maps, Google Visualizations, AppEngine, Google Guice (depedency injection framework).
I will be posting more details about the various tracks shortly!!

Technorati Profile

Browse posts by month

Browse by author

We're always looking for rockstars

Come take a look at careers with Molecular