Polymer Elements

View Demo →

Overview

Polymer is a JavaScript framework for building Web Components, which, at their most basic level, are a way to package up styling and functionality into new, custom HTML tags that can be easily reused or shared with others.

The elements in this demo allow you to build dashboards to report your Google Analytics data without having to write any JavaScript!

A dashboard built with the Google Analytics Polymer elements.

Here's what the code looks like to make a chart that displays traffic to your site over the past 30 days:

<google-analytics-chart
  type="area"
  metrics="ga:sessions"
  dimensions="ga:date"
  startDate="30daysAgo"
  endDate="yesterday">
</google-analytics-chart>

That's it! It's just a single HTML element with query parameters as its attributes. All the code is packaged behind the scenes so you don't have to deal with it (though a friendly and powerful interface is available to you if you do.)

To learn more about the various <google-analytics> elements check out the demo, code, and documentation on Github.