Friday, October 30, 2009

Google Analytics API on App Engine Treemap Visualization

It's Friday, time for some fun!

Here is a captivating way to visualize your Google Analytics data in a Treemap visualization and you can visualize your own data with our live demo.
(note: IE currently not supported for visualization part)





The goal of this example was to teach people how to use the Google Analytics API on App Engine in Java. As well as demonstrating how to use both OAuth and AuthSub along with the App Engine's various services. The code looked great, but the output was a boring HTML table. So I used some open source tools to transform the table into a pretty tree map visualization!

All the code has been open sourced on Google Project hosting. I also wrote an article describing how this application works making it easy for developers to use this example as a starting point for new data visualizations and other Google Data projects.

For the data retrieval part, this example uses the App Engine Java SDK and the Google Analytics Data Export API Java Client Library to retrieve data from Google Analytics. The example code implements both unsigned AuthSub and registered OAuth authorization methods allowing developers to get up and running quickly in development environments and later switch to a secure authorization method in production environments. The application also uses the Model-View-Controller pattern, making it flexible and allowing developers to extend the code for new applications. (like adding support for other Google Data APIs)

For the visualization part, I used the open-sourced Protovis SVG Visualization Library to create the Treemap. This JavaScript library is maintained by the Stanford Visualization Group and excels at creating brand new visualizations from a data set (in this case a boring HTML table). To handle all of the interactions, including rollover, tooltips and slider controls, I used JQuery. Here is the JavaScript source to the visualization part of the sample.

Enjoy!



P.S. If you have created any cool new visualizations using the Google Analytics Data Export API, email us so we can highlight them as well.

Monday, October 26, 2009

Customize your results snippets with structured data

Custom Search themes make it easy for you to customize the look and feel of your search results pages. And if you want to take the customization gig further, you can also customize the result snippet—a small sample of content that gives search users an idea of what's in the webpage—by using structured data.

When you are reading a webpage that reviews a film, you can figure out what the title is, what reviewers thought of the film, and how they rated it. You can even search for stores with the best prices for the DVD. Structured data can convey the meaning of such key information to computers.

Structured data formats—such as microformats, RDFa, and PageMaps—are semantic markup that you add to your HTML page. Structured data make web content more meaningful to machines. These attributes do not change the formatting of your website, they just make the text enclosed within the XHTML tags "understandable" by computers and influence what shows up in the result snippets.

When you tag your webpages with structured data, Custom Search indexes them and sends the metadata back in the XML results for your page. You can then take this XML feed and transform it into HTML results that showcase key information—such as image thumbnails, summaries, dates, authorship, ratings, and prices. Having the most relevant information in your search results makes the webpages in your site more compelling to your users.

You can, for example, create the following kind of rich snippets:


You can even add thumbnails and actions that let your users download files or make purchases.


To learn more, read the Custom Search Developer's Guide.

Customize your search results page with themes

If you can select headgear for your LEGO ® action figures, your search engine should let you customize the theme for your search results page, right? Darn tooting!

True, Custom Search already lets you customize the look and feel of your search results page, but we're making it easier. You can now go to the control panel and select one of the predefined themes that broadly matches the look and feel of your website.

If the standard themes are not quite what you want, you can make further changes. You can tinker with the page layout (Why stick with a single column of results, when you can have two?) and play with the font colors and types. The standard themes paired with the "Compact" layout option are optimized for mobile devices, so they work well on iPhone, Android devices, and Pre.

If you want a greater level of control than that, you can download the CSS, tweak it in a text editor, and host the CSS in your website. You can make your search results page blend with the style of the rest of your website.


To learn more, read the Custom Search Developer's Guide.

Tuesday, October 20, 2009

Introducing the Website Optimizer Experiment Management API

Today at the eMetrics conference in Washington DC we announced the new Website Optimizer Experiment Management API. The API allows for the creation and management of experiments outside of the Website Optimizer interface.

If you're not familiar with Google Website Optimizer, it's a free tool for running A/B and multivariate experiments on a website. Website Optimizer handles splitting a website's traffic, serving different variations, and crunching the numbers to find statistical significance.

Creating experiments with Website Optimizer usually involves a lot of back and forth between your website and the Website Optimizer interface. Using the API, you can integrate Website Optimizer into your platform. In short, you can create and launch experiments from whatever tool you use to edit your site.

You'll find more about the GWO API on its Google Code site: http://code.google.com/apis/analytics/docs/gwo/.

You can also join the Website Optimizer engineers for a webinar on the Website Optimizer Experiment Management API. The webinar will be held on October 28th at 10AM PDT. During the webinar, Website Optimizer engineers will walk you through how the API works. Additionally, two platforms that have already integrated using the API will demonstrate their integrations.

You need to register for the webinar, which you can do here. We'll record the webinar as well so you can reference it later.

We're very excited about the Website Optimizer API and what it means for website testing. Let us know your thoughts in the comments.

Friday, October 16, 2009

Let's make the mobile web faster

This week, we've been celebrating all things mobile across Google. Of course, this wouldn't be complete without a component for mobile web developers! Two months ago we asked you to make the web faster. Now, we've asked the Google Mobile team for some best practices, tips, and resources for mobile web development, and we've come up with a few things we wanted to share. "Go Mobile!" with our Make the mobile web faster article.

Issue Tracker Data API for Project Hosting

I'm excited to announce the Issue Tracker Data API for Project Hosting on Google Code! The Issue Tracker Data API is a Google Data API that you can use to programmatically add new issues, make changes to existing issues, or simply access issues for your open source project.

This means that the issue tracker data for your open source code is now liberated!

To get started with the API, please refer to the following documentation:
If you find yourself digging into the API and creating something useful that others can use, please let us know and we'll be sure to add it to our documentation. As always, your feedback is also welcome.

The team would also like to thank Joe LaPenna, who contributed the Python client for the Issue Tracker Data API in his 20% time.



Update: Net::Google::Code now supports the Issue Tracker Data API

Wednesday, October 14, 2009

"View Source" - a new series about sites using HTML5

View Source is a new series where we crack open cool web sites and applications and detail how they were made, step by step. The series will be hosted on Ajaxian, but the Code blog will always carry a link to any new posts that come out in the series. We hope that the articles will help you understand how developers out there are using HTML5 and other Open Web technologies.

Here are links to two articles from this series that were published over the last few days:

"View Source Tutorial: Sticky Notes With HTML5 and CSS3"

"View Source Tutorial: Fancy Web Page Using HTML5, CSS, and SVG"



Monday, October 12, 2009

Mark your calendars for Google I/O 2010

We're excited to share the dates for Google I/O 2010! Mark your calendars:

Google I/O
May 19 - 20, 2010
Moscone Center, San Francisco


Here's a quick look back at this year's event:



Early registration for I/O 2010 will open in January. Until then, you can follow us on Twitter and check out code.google.com/io.

See you in May!

Friday, October 09, 2009

Mercurial server-side clone support for Project Hosting on Google Code

When we launched Mercurial support our goal was to get to a point where we could enable a social coding experience. Today, I am happy to announce that today we have support for both 'project' clones and 'user' clones.

Project owners can now create multiple repositories for their project, and they can choose to make any of those new repositories a clone of any of the project's other repositories. These project clones share the same commit access permissions as the original project and make it easier for project members to work together on new features. A common pattern in the Mercurial world is to place each "official" branch into a separate repository with naming conventions like "project-crew", "project-stable", and so on.

In addition to project clones, any user can visit any Mercurial repository and create a server-side user clone of that repository, without asking permission from the project owner. These personal user clones can be easily shared with other developers -- who also can make a clone of that clone. Once a user has finished her changes in a user clone, she can coordinate with the canonical project's contributors to review and incorporate her changes.



User clones aren't forks, in the traditional sense, where a fork has little intention to contribute back to the original project. Rather, the entire purpose of a user clone is to allow users to contribute to projects without requiring official commit access permissions. Because mercurial is a distributed (peer-to-peer) version control system, it excels at branching and merging. If the project maintainers like the new code, they just "pull" the changesets from the clone and merge them into an official project repository. It's all much more elegant than emailing patches back and forth, anonymous contributors get to use the same tools as core developers.

The instructions for creating a user clone can be found on the checkout page for any Mercurial project (e.g. twisty) and existing clones for a project can be found under the Clones sub-tab under Source.

Please let us know if you have any feedback or find any issues. Happy cloning!

Monday, October 05, 2009

Refreshing code.google.com/speed

Today, we're happy to share some updates on code.google.com/speed with you.

We launched code.google.com/speed in June, to give web developers access to tools and resources that help them improve the performance of their applications. Since then, the developer community provided us with plenty of suggestions on how to improve our site. Based on your feedback, we made the following improvements:
  • We added new content: 
    • Four new best practice articles on topics such as optimizing JavaScript
    • Two new tech talks on new developer tools
    • A blog gadget that aggregates performance related posts from Google blogs.
  • We improved the layout to make navigation between different tutorials, tech talks and tools smoother.


Just as making the web faster is an ongoing process, we plan to continue updating and enhancing code.google.com/speed with more resources. Currently, we are focusing on increasing community involvement, such as adding more tutorials and tech talks from non-Google authors. So, as a first step, if you have recently written an interesting article on web performance, please let us know by filling in this form. Our team will evaluate all entries and may contact you for potential next steps.

Together, let's make the web faster!