/* TopPagesGoogleVis: a Google Visualization gadget to display top viewed pages Note that it expects a query in the format: SELECT METRICS ga:visits ON COLUMNS DIMENSIONS ga:pagePath, ga:pageTitle ON ROWS TOP 10 NOOTHER BY ga:visits FROM [www.domain.com] WHERE TIMEFRAME last30Days but use your own topcount, profile and desired timeframe */ // Declare a unique namespace. var ShufflePointVis = {}; // Class constructor. Parameter container is a DOM elementon the client that // that will contain the visualization. ShufflePointVis.TopPageViews = function(container) { this.containerElement = container; } // Main drawing logic. // Parameters: // data is data to display, type google.visualization.DataTable. // options is a name/value map of options. Our example takes one option. ShufflePointVis.TopPageViews.prototype.draw = function(data, options) { // Create an HTML table var showRank = options.showRankNumber; // Boolean configuration option. var html = []; var ptitle; html.push('
',options.rankHeader,' | '); html.push('',options.pageHeader,' |
---|---|
', (row + 1), ' | '); html.push(''); html.push(this.escapeHtml(data.getFormattedValue(row, 1))); html.push(' | '); html.push('