[903] Integrated 777 branch and updated to fit the new look.
[903] Integrated 777 branch and updated to fit the new look.

.table-condensed td.sparkline-cell { .table-condensed td.sparkline-cell {
padding: 1px 0 0 0; padding: 1px 0 0 0;
width: 108px; width: 108px;
text-align: center; text-align: center;
/* Hack to hide the momentary flash of text /* Hack to hide the momentary flash of text
* before sparklines are fully rendered */ * before sparklines are fully rendered */
font-size: 1px; font-size: 1px;
color: transparent; color: transparent;
overflow: hidden; overflow: hidden;
} }
.rickshaw_chart_container { .rickshaw_chart_container {
position: relative; position: relative;
height: 350px; height: 350px;
margin: 0 auto 20px auto; margin: 0 auto 20px auto;
} }
.rickshaw_chart { .rickshaw_chart {
position: absolute; position: absolute;
left: 40px; left: 40px;
width: 500px; width: 500px;
top: 0; top: 0;
bottom: 0; bottom: 0;
} }
.rickshaw_legend { .rickshaw_legend {
background: transparent; background: transparent;
width: 100%; width: 100%;
padding-top: 4px; padding-top: 4px;
} }
.rickshaw_y_axis { .rickshaw_y_axis {
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
width: 40px; width: 40px;
} }
.rickshaw_legend .label { .rickshaw_legend .label {
background: transparent !important; background: transparent !important;
color: #000000 !important; color: #000000 !important;
font-weight: normal !important; font-weight: normal !important;
} }
.rickshaw_legend .instructions { .rickshaw_legend .instructions {
color: #000; color: #000;
margin-bottom: 6px; margin-bottom: 6px;
} }
   
.rickshaw_legend .line .action { .rickshaw_legend .line .action {
display: none; display: none;
} }
.rickshaw_legend .line .swatch { .rickshaw_legend .line .swatch {
display: block; display: block;
float: left; float: left;
} }
.rickshaw_legend .line .label { .rickshaw_legend .line .label {
display: block; display: block;
white-space: normal; white-space: normal;
float: left; float: left;
width: 200px; width: 200px;
} }
.rickshaw_legend .line .label:hover { .rickshaw_legend .line .label:hover {
text-decoration: underline; text-decoration: underline;
} }
   
.ga-reports-table .td-numeric { .ga-reports-table .td-numeric {
text-align: center; text-align: center;
} }
.ga-reports-heading { .ga-reports-heading {
padding-right: 10px; padding-right: 10px;
margin-top: 4px; margin-top: 4px;
float: left; float: left;
} }
  .tab-content {
  padding-top: 12px;
  }
   
<html <html
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:i18n="http://genshi.edgewall.org/i18n" xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:py="http://genshi.edgewall.org/" xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="" py:strip=""
> >
   
<select name="month" py:def="month_selector(current_month, months, day)"> <select name="month" py:def="month_selector(current_month, months, day)">
<option value='' py:attrs="{'selected': 'selected' if not current_month else None}">All months</option> <option value='' py:attrs="{'selected': 'selected' if not current_month else None}">All months</option>
<py:for each="(iso_code,string_name) in months"> <py:for each="(iso_code,string_name) in months">
<option value='${iso_code}' py:attrs="{'selected': 'selected' if current_month == iso_code else None}">${h.month_option_title(iso_code,months,day)}</option> <option value='${iso_code}' py:attrs="{'selected': 'selected' if current_month == iso_code else None}">${h.month_option_title(iso_code,months,day)}</option>
</py:for> </py:for>
</select> </select>
   
   
<table py:def="social_table(items, with_source=False)" class="ga-reports-table table table-condensed table-bordered table-striped"> <table py:def="social_table(items, with_source=False)" class="ga-reports-table table table-condensed table-bordered table-striped">
<tr> <tr>
<th>Name</th> <th>Name</th>
<th py:if="with_source">Source</th> <th py:if="with_source">Source</th>
<th>Visits</th> <th>Visits</th>
</tr> </tr>
<py:for each="name, url, source, count in items"> <py:for each="name, url, source, count in items">
<tr> <tr>
<td><a href="${url}">${name}</a></td> <td><a href="${url}">${name}</a></td>
<td py:if="with_source">${source}</td> <td py:if="with_source">${source}</td>
<td class="td-numeric">${count}</td> <td class="td-numeric">${count}</td>
</tr> </tr>
</py:for> </py:for>
</table> </table>
   
   
<div py:def="rickshaw_graph(items_json,id,mode='line',colorscheme='munin')"> <div py:def="rickshaw_graph(items_json,id,mode='line',colorscheme='munin')">
<div id="chart_container_$id" class="rickshaw_chart_container"> <div id="chart_container_$id" class="rickshaw_chart_container">
<div id="y_axis_$id" class="rickshaw_y_axis"></div> <div id="y_axis_$id" class="rickshaw_y_axis"></div>
<div id="chart_$id" class="rickshaw_chart"></div> <div id="chart_$id" class="rickshaw_chart"></div>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
var items = $items_json; var items = $items_json;
CKAN.GA_Reports.render_rickshaw('$id', items, '$mode', '$colorscheme'); CKAN.GA_Reports.render_rickshaw('$id', items, '$mode', '$colorscheme');
}); });
</script> </script>
</div> </div>
</div> </div>
   
   
<table py:def="stat_table(items, title='Views')" class="ga-reports-table table table-condensed table-bordered table-striped"> <table py:def="stat_table(items, title='Views')" class="ga-reports-table table table-condensed table-bordered table-striped">
<tr> <tr>
<th>Name</th> <th>Name</th>
<th class="td-numeric">% ${title}</th> <th class="td-numeric">% ${title}</th>
</tr> </tr>
<py:for each="name, value in items"> <py:for each="name, value in items">
<tr> <tr>
<td>${name}</td> <td>${name}</td>
<td class="td-numeric">${value}</td> <td class="td-numeric">${value}</td>
</tr> </tr>
</py:for> </py:for>
</table> </table>
   
  <py:def function="ga_footer()">
<div py:def="usage_nav(active_name)"> <div class="panel panel-default">
<span class="subheading"> <div class="panel-heading"><strong>Notes</strong></div>
<img src="/images/arrow-down-right.png" /> <div class="panel-body">
<a class="${if_(active_name=='Site-wide','active')}" href="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}${if_(c.month,'?month='+c.month)}">Site-wide</a>  
<span class="divider">|</span>  
<a class="${if_(active_name=='Publishers','active')}" href="${h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='publishers')}${if_(c.month,'?month='+c.month)}">Publishers</a>  
<span class="divider">|</span>  
<a class="${if_(active_name=='Datasets','active')}" href="${h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='read')}${if_(c.month,'?month='+c.month)}">Datasets</a>  
</span>  
</div>  
   
<div py:def="ga_sidebar(download_link)">  
<div class="widget-container widget_text">  
<h4>Download</h4>  
<p><center>  
<a class="btn button btn-primary" href="${download_link}">Download as CSV</a></center>  
</p>  
</div>  
<div class="widget-container widget_text">  
<h4>Graph Legend</h4>  
<div id="graph-legend-container">  
<div style="display: none;" id="legend_none">(No graph is loaded)</div>  
</div>  
</div>  
<div class="widget-container widget_text">  
<h4>Notes</h4>  
<ul> <ul>
<li>"Views" is the number of times a page was loaded in users' browsers.</li> <li>"Views" is the number of times a page was loaded in users' browsers.</li>
<li>"Downloads" is the number of times a user has clicked to download either an original or cached resource for a particular dataset. Download information is only available from 2nd December 2012; 'No data' is shown for records before that date.</li> <li>"Downloads" is the number of times a user has clicked to download either an original or cached resource for a particular dataset. Download information is only available from 2nd December 2012; 'No data' is shown for records before that date.</li>
<li>These usage statistics are confined to users with javascript enabled, which excludes web crawlers and API calls.</li> <li>These usage statistics are confined to users with javascript enabled, which excludes web crawlers and API calls.</li>
<li>The results are not shown when the number of views/visits is tiny. Where these relate to site pages, results are available in full in the CSV download. Where these relate to users' web browser information, results are not disclosed, for privacy reasons.</li> <li>The results are not shown when the number of views/visits is tiny. Where these relate to site pages, results are available in full in the CSV download. Where these relate to users' web browser information, results are not disclosed, for privacy reasons.</li>
</ul> </ul>
</div> </div>
  </div>
</div> </py:def>
   
   
</html> </html>
   
<html xmlns:py="http://genshi.edgewall.org/" <html xmlns:py="http://genshi.edgewall.org/"
xmlns:i18n="http://genshi.edgewall.org/i18n" xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip=""> py:strip="">
   
<xi:include href="../ga_util.html" /> <xi:include href="../ga_util.html" />
   
<py:def function="page_title">Usage by Publisher</py:def> <py:def function="page_title">Usage by Publisher</py:def>
   
   
<py:def function="sidebar">  
${ga_sidebar(download_link=h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='publisher_csv',month=c.month or 'all'))}  
</py:def>  
   
   
<py:def function="optional_head"> <py:def function="optional_head">
<link rel="stylesheet" type="text/css" href="/scripts/vendor/rickshaw.min.css"/> <link rel="stylesheet" type="text/css" href="/scripts/vendor/rickshaw.min.css"/>
<link rel="stylesheet" type="text/css" href="/css/ga_report.css?1"/> <link rel="stylesheet" type="text/css" href="/css/ga_report.css?1"/>
<script type="text/javascript" src="/scripts/modernizr-2.6.2.custom.js"></script> <script type="text/javascript" src="/scripts/modernizr-2.6.2.custom.js"></script>
<script type="text/javascript" src="/scripts/ckanext_ga_reports.js?1"></script> <script type="text/javascript" src="/scripts/ckanext_ga_reports.js?1"></script>
<script type="text/javascript" src="/scripts/vendor/jquery.sparkline.modified.js"></script> <script type="text/javascript" src="/scripts/vendor/jquery.sparkline.modified.js"></script>
<script type="text/javascript" src="/scripts/rickshaw_ie7_shim.js"></script> <script type="text/javascript" src="/scripts/rickshaw_ie7_shim.js"></script>
<script type="text/javascript" src="/scripts/vendor/d3.v2.js"></script> <script type="text/javascript" src="/scripts/vendor/d3.v2.js"></script>
<script type="text/javascript" src="/scripts/vendor/d3.layout.min.js"></script> <script type="text/javascript" src="/scripts/vendor/d3.layout.min.js"></script>
<script type="text/javascript" src="/scripts/vendor/rickshaw.min.js"></script> <script type="text/javascript" src="/scripts/vendor/rickshaw.min.js"></script>
</py:def> </py:def>
   
<py:match path="breadcrumbs"> <py:match path="breadcrumbs">
<li><a href="/data/site-usage">Site Analytics</a></li> <li><a href="/data/site-usage">Site Analytics</a></li>
<li><a href="/data/site-usage/publisher">Publishers</a></li> <li><a href="/data/site-usage/publisher">Publishers</a></li>
</py:match> </py:match>
   
  <div py:match="content">
  <py:with vars="download_link=h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='publisher_csv',month=c.month or 'all')">
  <a class="btn button btn-primary btn-sm pull-right" href="${download_link}"><i class="icon-download"></i>&nbsp; Download as CSV</a>
  </py:with>
  <h1>Site Usage</h1>
   
  <div class="row" style="background: #fff;">
<div py:match="content"> <div class="col-md-4">
  <div class="whitebox">
<h3 style='text-align:center;'> <strong>Graph Legend</strong>
<a href="/data/site-usage">Site-wide</a> <div id="graph-legend-container">
<span style="color: #bbb;margin:10px;">|</span> <div style="display: none;" id="legend_none">(No graph is loaded)</div>
Publishers </div>
<span style="color: #bbb;margin:10px;">|</span> </div>
<a href="/data/site-usage/dataset">Datasets</a> </div>
</h3> <div class="col-md-8">
  <div class="whitebox">
  <strong>Publishers</strong>
<div class="boxed"> ${rickshaw_graph(c.top_publishers_graph,'publishers')}
  </div>
${rickshaw_graph(c.top_publishers_graph,'publishers')} </div>
  </div>
   
<hr/> <hr/>
<form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='publishers')}" method="get"> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='publishers')}" method="get">
<div class="controls"> <div class="controls">
<h4 class="ga-reports-heading">Statistics for</h4> <h2 class="ga-reports-heading">Statistics for</h2>
${month_selector(c.month, c.months, c.day)} ${month_selector(c.month, c.months, c.day)}
</div> </div>
</form> </form>
   
<table class="ga-reports-table table table-condensed table-bordered table-striped"> <table class="ga-reports-table table table-condensed table-bordered table-striped">
<tr> <tr>
<th>Publisher</th> <th>Publisher</th>
<th class="td-numeric">Dataset Views</th> <th class="td-numeric">Dataset Views</th>
</tr> </tr>
<py:for each="publisher, views, visits in c.top_publishers"> <py:for each="publisher, views, visits in c.top_publishers">
<tr> <tr>
<td> <td>
${h.link_to(publisher.title, h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport', action='read_publisher', id=publisher.name) + (("?month=" + c.month) if c.month else ''))} ${h.link_to(publisher.title, h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport', action='read_publisher', id=publisher.name) + (("?month=" + c.month) if c.month else ''))}
</td> </td>
<td class="td-numeric">${views}</td> <td class="td-numeric">${views}</td>
</tr> </tr>
</py:for> </py:for>
</table> </table>
</div><!--/boxed-->  
</div><!--/content--> </div><!--/content-->
   
<py:def function="optional_footer"> <py:def function="optional_footer">
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
CKAN.GA_Reports.bind_month_selector(); CKAN.GA_Reports.bind_month_selector();
}); });
</script> </script>
</py:def> </py:def>
<xi:include href="../../layout.html" /> <xi:include href="../../layout.html" />
   
</html> </html>
   
   
<html xmlns:py="http://genshi.edgewall.org/" <html xmlns:py="http://genshi.edgewall.org/"
xmlns:i18n="http://genshi.edgewall.org/i18n" xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip=""> py:strip="">
   
<xi:include href="../ga_util.html" /> <xi:include href="../ga_util.html" />
   
<py:def function="page_title">Usage by Dataset</py:def> <py:def function="page_title">Usage by Dataset</py:def>
   
<py:def function="optional_head"> <py:def function="optional_head">
<link rel="stylesheet" type="text/css" href="/scripts/vendor/rickshaw.min.css"/> <link rel="stylesheet" type="text/css" href="/scripts/vendor/rickshaw.min.css"/>
<link rel="stylesheet" type="text/css" href="/css/ga_report.css?1"/> <link rel="stylesheet" type="text/css" href="/css/ga_report.css?1"/>
<script type="text/javascript" src="/scripts/modernizr-2.6.2.custom.js"></script> <script type="text/javascript" src="/scripts/modernizr-2.6.2.custom.js"></script>
<script type="text/javascript" src="/scripts/ckanext_ga_reports.js?1"></script> <script type="text/javascript" src="/scripts/ckanext_ga_reports.js?1"></script>
<script type="text/javascript" src="/scripts/vendor/jquery.sparkline.modified.js"></script> <script type="text/javascript" src="/scripts/vendor/jquery.sparkline.modified.js"></script>
<script type="text/javascript" src="/scripts/rickshaw_ie7_shim.js"></script> <script type="text/javascript" src="/scripts/rickshaw_ie7_shim.js"></script>
<script type="text/javascript" src="/scripts/vendor/d3.v2.js"></script> <script type="text/javascript" src="/scripts/vendor/d3.v2.js"></script>
<script type="text/javascript" src="/scripts/vendor/d3.layout.min.js"></script> <script type="text/javascript" src="/scripts/vendor/d3.layout.min.js"></script>
<script type="text/javascript" src="/scripts/vendor/rickshaw.min.js"></script> <script type="text/javascript" src="/scripts/vendor/rickshaw.min.js"></script>
</py:def> </py:def>
   
<py:def function="sidebar">  
${ga_sidebar(download_link=h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='dataset_csv',id=c.publisher_name or 'all',month=c.month or 'all'))}  
</py:def>  
   
<py:match path="breadcrumbs"> <py:match path="breadcrumbs">
<li><a href="/data/site-usage">Site Analytics</a></li> <li><a href="/data/site-usage">Site Analytics</a></li>
<li><a href="/data/site-usage/publisher">Datasets</a></li> <py:if test="c.publisher">
<li py:if="c.publisher"><a href="/data/site-usage/publisher/${c.publisher.name}">${c.publisher.title}</a></li> <li><a href="/data/site-usage/publisher">Publishers</a></li>
  <li py:if="c.publisher"><a href="/data/site-usage/publisher/${c.publisher.name}">${c.publisher.title}</a></li>
  </py:if>
  <py:if test="not c.publisher">
  <li><a href="${request.url}">Usage By Dataset</a></li>
  </py:if>
</py:match> </py:match>
   
  <div py:match="content">
   
  <py:with vars="download_link=h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='dataset_csv',id=c.publisher_name or 'all',month=c.month or 'all')">
  <a class="btn button btn-primary btn-sm pull-right" href="${download_link}"><i class="icon-download"></i>&nbsp; Download as CSV</a>
  </py:with>
  <h1>Site Usage</h1>
   
<div py:match="content"> <div class="row" style="background: #fff;">
<h3 style='text-align:center;'> <div class="col-md-4">
<a href="/data/site-usage">Site-wide</a> <div class="whitebox">
<span style="color: #bbb;margin:10px;">|</span> <strong>Graph Legend</strong>
<a href="/data/site-usage/publisher">Publishers</a> <div id="graph-legend-container">
<span style="color: #bbb;margin:10px;">|</span> <div style="display: none;" id="legend_none">(No graph is loaded)</div>
Datasets </div>
</h3> </div>
  </div>
  <div class="col-md-8">
  <div class="whitebox">
  <strong py:if="c.publisher">Datasets From <a href="${h.url_for(controller='ckanext.dgu.controllers.publisher:PublisherController',action='read',id=c.publisher.name)}">${c.publisher.title}</a></strong>
  <strong py:if="not c.publisher">All Datasets</strong>
  <py:if test="c.graph_data">
  ${rickshaw_graph(c.graph_data,'dataset-downloads',debug=True)}
  </py:if>
  </div>
  </div>
  </div>
  <hr/>
  <py:if test="c.month">
  <h4>Statistics for ${h.month_option_title(c.month,c.months,c.day)}:</h4>
  </py:if>
  <py:if test="not c.month">
  <h2>Statistics for all months</h2>
  </py:if>
  <form style="margin-bottom:10px;" class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='read')}" method="get">
  <div class="controls">
   
  ${month_selector(c.month, c.months, c.day)}
   
<div class="boxed"> <select name="publisher">
<h3 py:if="c.publisher"><a href="${h.url_for(controller='ckanext.dgu.controllers.publisher:PublisherController',action='read',id=c.publisher.name)}">${c.publisher.title}</a></h3> <option value='' py:attrs="{'selected': 'selected' if not c.publisher else None}">All publishers</option>
  <py:for each="val,desc in c.publishers">
  <option value='${val}' py:attrs="{'selected': 'selected' if c.publisher_name == val else None}">${desc}</option>
  </py:for>
  </select>
  <input class="btn button btn-primary btn-xs" type='submit' value="Update"/>
  </div>
  </form>
  <div class="alert alert-info" py:if="not c.top_packages">No page views in this period.</div>
  <py:if test="c.top_packages">
  <table class="ga-reports-table table table-condensed table-bordered">
  <tr>
  <th>Dataset</th>
  <th>Views</th>
  <th>Downloads</th>
  </tr>
  <py:for each="package, views, visits,downloads in c.top_packages">
  <tr>
  <td>
  ${h.link_to(package.title or package.name, h.url_for(controller='package', action='read', id=package.name))}
  </td>
  <td class="td-numeric">${views}</td>
  <td class="td-numeric">${downloads}</td>
  </tr>
  </py:for>
  </table>
  </py:if>
   
<py:if test="c.graph_data"> ${ga_footer()}
${rickshaw_graph(c.graph_data,'dataset-downloads',debug=True)}  
</py:if>  
<form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='read')}" method="get">  
<div class="controls">  
   
${month_selector(c.month, c.months, c.day)}  
   
<select name="publisher">  
<option value='' py:attrs="{'selected': 'selected' if not c.publisher else None}">All publishers</option>  
<py:for each="val,desc in c.publishers">  
<option value='${val}' py:attrs="{'selected': 'selected' if c.publisher_name == val else None}">${desc}</option>  
</py:for>  
</select>  
<input class="btn button btn-primary" type='submit' value="Update"/>  
</div>  
</form>  
<py:if test="c.month">  
<h4>Statistics for ${h.month_option_title(c.month,c.months,c.day)}:</h4>  
</py:if>  
<py:if test="not c.month">  
<h4>Statistics for all months:</h4>  
</py:if>  
<div class="alert alert-info" py:if="not c.top_packages">No page views in this period.</div>  
<py:if test="c.top_packages">  
<table class="ga-reports-table table table-condensed table-bordered table-striped">  
<tr>  
<th>Dataset</th>  
<th>Views</th>  
<th>Downloads</th>  
</tr>  
<py:for each="package, views, visits,downloads in c.top_packages">  
<tr>  
<td>  
${h.link_to(package.title or package.name, h.url_for(controller='package', action='read', id=package.name))}  
</td>  
<td class="td-numeric">${views}</td>  
<td class="td-numeric">${downloads}</td>  
</tr>  
</py:for>  
</table>  
</py:if>  
   
</div>  
   
</div> </div>
   
<xi:include href="../../layout.html" /> <xi:include href="../../layout.html" />
</html> </html>
   
   
   
   
<html xmlns:py="http://genshi.edgewall.org/" <html xmlns:py="http://genshi.edgewall.org/"
xmlns:i18n="http://genshi.edgewall.org/i18n" xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip=""> py:strip="">
   
<xi:include href="../ga_util.html" /> <xi:include href="../ga_util.html" />
   
<py:def function="page_title">Site usage</py:def> <py:def function="page_title">Site usage</py:def>
   
<py:def function="optional_head"> <py:def function="optional_head">
<link rel="stylesheet" type="text/css" href="/scripts/vendor/rickshaw.min.css"/> <link rel="stylesheet" type="text/css" href="/scripts/vendor/rickshaw.min.css"/>
<link rel="stylesheet" type="text/css" href="/css/ga_report.css?1"/> <link rel="stylesheet" type="text/css" href="/css/ga_report.css?1"/>
<script type="text/javascript" src="/scripts/modernizr-2.6.2.custom.js"></script> <script type="text/javascript" src="/scripts/modernizr-2.6.2.custom.js"></script>
<script type="text/javascript" src="/scripts/ckanext_ga_reports.js?1"></script> <script type="text/javascript" src="/scripts/ckanext_ga_reports.js?1"></script>
<script type="text/javascript" src="/scripts/vendor/jquery.sparkline.modified.js"></script> <script type="text/javascript" src="/scripts/vendor/jquery.sparkline.modified.js"></script>
<script type="text/javascript" src="/scripts/rickshaw_ie7_shim.js"></script> <script type="text/javascript" src="/scripts/rickshaw_ie7_shim.js"></script>
<script type="text/javascript" src="/scripts/vendor/d3.v2.js"></script> <script type="text/javascript" src="/scripts/vendor/d3.v2.js"></script>
<script type="text/javascript" src="/scripts/vendor/d3.layout.min.js"></script> <script type="text/javascript" src="/scripts/vendor/d3.layout.min.js"></script>
<script type="text/javascript" src="/scripts/vendor/rickshaw.min.js"></script> <script type="text/javascript" src="/scripts/vendor/rickshaw.min.js"></script>
</py:def> </py:def>
   
<py:def function="sidebar">  
${ga_sidebar(download_link=h.url_for(controller='ckanext.ga_report.controller:GaReport',action='csv',month=c.month or 'all'))}  
</py:def>  
   
   
<py:match path="breadcrumbs"> <py:match path="breadcrumbs">
<li><a href="/data/site-usage">Site Analytics</a></li> <li><a href="/data/site-usage">Site Analytics</a></li>
<li><a href="/data/site-usage">Site-wide</a></li> <li><a href="/data/site-usage">Site-wide</a></li>
</py:match> </py:match>
   
   
<div py:match="content"> <div py:match="content">
  <div class="row">
<h3 style='text-align:center;'> <div class="col-sm-7 col-md-8 col-lg-9">
Site-wide <py:with vars="download_link=h.url_for(controller='ckanext.ga_report.controller:GaReport',action='csv',month=c.month or 'all')">
<span style="color: #bbb;margin:10px;">|</span> <a class="btn button btn-primary btn-sm pull-right" href="${download_link}"><i class="icon-download"></i>&nbsp; Download as CSV</a>
<a href="/data/site-usage/publisher">Publishers</a> </py:with>
<span style="color: #bbb;margin:10px;">|</span> <h1>Site Usage</h1>
<a href="/data/site-usage/dataset">Datasets</a> </div>
</h3> <div class="col-sm-5 col-md-4 col-lg-3">
  <div class="panel panel-default">
<div class="boxed"> <div class="panel-heading"><strong>Jump To...</strong></div>
<div class="tabbable"> <div class="panel-body">
<ul class="nav nav-tabs"> <ul>
<li class="active"><a href="#totals" data-toggle="hashtab">Totals</a></li> <li><a href="/data/site-usage/publisher">Publisher Usage Statistics</a></li>
<li class="dropdown"> <li><a href="/data/site-usage/dataset">Dataset Usage Statistics</a></li>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Browsers  
<b class="caret"></b></a>  
<ul class="dropdown-menu">  
<li><a href="#browsers_names" data-toggle="hashtab">Browsers</a></li>  
<li><a href="#browsers_versions" data-toggle="hashtab">Versions</a></li>  
</ul> </ul>
</li> </div>
<li class="dropdown"> </div>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Operating Systems </div>
<b class="caret"></b></a> </div>
<ul class="dropdown-menu">  
<li><a href="#os" data-toggle="hashtab">Operating Systems</a></li> <div class="row" style="background: #fff;">
<li><a href="#os_versions" data-toggle="hashtab">Versions</a></li> <div class="col-md-4">
  <div class="whitebox">
  <strong>Graph Legend</strong>
  <div id="graph-legend-container">
  <div style="display: none;" id="legend_none">(No graph is loaded)</div>
  </div>
  </div>
  </div>
  <div class="col-md-8">
  <div class="whitebox">
  <div class="tabbable">
  <ul class="nav nav-tabs">
  <li class="active"><a href="#totals" data-toggle="hashtab">Totals</a></li>
  <li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown">Browsers
  <b class="caret"></b></a>
  <ul class="dropdown-menu">
  <li><a href="#browsers_names" data-toggle="hashtab">Browsers</a></li>
  <li><a href="#browsers_versions" data-toggle="hashtab">Versions</a></li>
  </ul>
  </li>
  <li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown">Operating Systems
  <b class="caret"></b></a>
  <ul class="dropdown-menu">
  <li><a href="#os" data-toggle="hashtab">Operating Systems</a></li>
  <li><a href="#os_versions" data-toggle="hashtab">Versions</a></li>
  </ul>
  </li>
  <li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown">Social
  <b class="caret"></b></a>
  <ul class="dropdown-menu">
  <li><a href="#social_networks" data-toggle="hashtab">All networks</a></li>
  <li><a href="#social_referrals_totals" data-toggle="hashtab">Referral links</a></li>
  </ul>
  </li>
  <li><a href="#languages" data-toggle="hashtab">Languages</a></li>
  <li><a href="#country" data-toggle="hashtab">Country</a></li>
</ul> </ul>
</li> <div class="tab-content">
<li class="dropdown"> <div class="tab-pane active" id="totals">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Social <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get">
<b class="caret"></b></a> <h4 class="ga-reports-heading">Show stats table for:</h4>
<ul class="dropdown-menu"> ${month_selector(c.month, c.months, c.day)}
<li><a href="#social_networks" data-toggle="hashtab">All networks</a></li> </form>
<li><a href="#social_referrals_totals" data-toggle="hashtab">Referral links</a></li> <table class="ga-reports-table table table-condensed table-bordered table-striped">
</ul> <tr>
</li> <th>Name</th>
<li><a href="#languages" data-toggle="hashtab">Languages</a></li> <th class="td-numeric">Value</th>
<li><a href="#country" data-toggle="hashtab">Country</a></li> <th>History</th>
</ul> </tr>
<div class="tab-content"> <py:for each="name, value, graph in c.global_totals">
<div class="tab-pane active" id="totals"> <tr>
<form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> <td>${name}</td>
<h4 class="ga-reports-heading">Show stats table for:</h4> <td class="td-numeric">${value}</td>
${month_selector(c.month, c.months, c.day)} <td class="sparkline-cell">
</form> <span class="sparkline" sparkTooltips="${','.join([x for x,y in graph])}">
<table class="ga-reports-table table table-condensed table-bordered table-striped"> ${','.join([y for x,y in graph])}
<tr> </span>
<th>Name</th> </td>
<th class="td-numeric">Value</th> </tr>
<th>History</th> </py:for>
</tr> </table>
<py:for each="name, value, graph in c.global_totals"> </div>
<tr> <div class="tab-pane" id="browsers_versions">
<td>${name}</td> ${rickshaw_graph(c.browser_versions_graph,'browser-versions',mode='stack')}
<td class="td-numeric">${value}</td> <hr/>
<td class="sparkline-cell"> <p>Note: Where a browser has a large number of versions, these have been grouped together.</p>
<span class="sparkline" sparkTooltips="${','.join([x for x,y in graph])}"> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get">
${','.join([y for x,y in graph])} <h4 class="ga-reports-heading">Show stats table for:</h4>
</span> ${month_selector(c.month, c.months, c.day)}
</td> </form>
</tr> <hr/>
</py:for> ${stat_table(c.browser_versions)}
</table> </div>
</div> <div class="tab-pane" id="browsers_names">
<div class="tab-pane" id="browsers_versions"> ${rickshaw_graph(c.browsers_graph,'browsers',mode='stack')}
${rickshaw_graph(c.browser_versions_graph,'browser-versions',mode='stack')} <hr/>
<hr/> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get">
<p>Note: Where a browser has a large number of versions, these have been grouped together.</p> <h4 class="ga-reports-heading">Show stats table for:</h4>
<form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> ${month_selector(c.month, c.months, c.day)}
<h4 class="ga-reports-heading">Show stats table for:</h4> </form>
${month_selector(c.month, c.months, c.day)} <hr/>
</form> ${stat_table(c.browsers)}
${stat_table(c.browser_versions)} </div>
</div> <div class="tab-pane" id="os">
<div class="tab-pane" id="browsers_names"> ${rickshaw_graph(c.os_graph,'os',mode='stack')}
${rickshaw_graph(c.browsers_graph,'browsers',mode='stack')} <hr/>
<hr/> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get">
<form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> <h4 class="ga-reports-heading">Show stats table for:</h4>
<h4 class="ga-reports-heading">Show stats table for:</h4> ${month_selector(c.month, c.months, c.day)}
${month_selector(c.month, c.months, c.day)} </form>
</form> <hr/>
${stat_table(c.browsers)} ${stat_table(c.os)}
</div> </div>
<div class="tab-pane" id="os"> <div class="tab-pane" id="os_versions">
${rickshaw_graph(c.os_graph,'os',mode='stack')} ${rickshaw_graph(c.os_versions_graph,'os_versions',mode='stack')}
<hr/> <hr/>
<form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get">
<h4 class="ga-reports-heading">Show stats table for:</h4> <h4 class="ga-reports-heading">Show stats table for:</h4>
${month_selector(c.month, c.months, c.day)} ${month_selector(c.month, c.months, c.day)}
</form> </form>
${stat_table(c.os)} <hr/>
</div> ${stat_table(c.os_versions)}
<div class="tab-pane" id="os_versions"> </div>
${rickshaw_graph(c.os_versions_graph,'os_versions',mode='stack')} <div class="tab-pane" id="social_referrals_totals">
<hr/> <p>Number of visits that were referred from social networks</p>
<form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get">
<h4 class="ga-reports-heading">Show stats table for:</h4> <h4 class="ga-reports-heading">Show stats table for:</h4>
${month_selector(c.month, c.months, c.day)} ${month_selector(c.month, c.months, c.day)}
</form> </form>
${stat_table(c.os_versions)} ${social_table(c.social_referrer_totals)}
</div> </div>
<div class="tab-pane" id="social_referrals_totals"> <div class="tab-pane" id="social_networks">
<p>Number of visits that were referred from social networks</p> ${rickshaw_graph(c.social_networks_graph, 'social_networks',mode='stack')}
<form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> <hr/>
<h4 class="ga-reports-heading">Show stats table for:</h4> <p>Percentage of visits that were referred from these social networks</p>
${month_selector(c.month, c.months, c.day)} <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get">
</form> <h4 class="ga-reports-heading">Show stats table for:</h4>
${social_table(c.social_referrer_totals)} ${month_selector(c.month, c.months, c.day)}
</div> </form>
<div class="tab-pane" id="social_networks"> <hr/>
${rickshaw_graph(c.social_networks_graph, 'social_networks',mode='stack')} ${stat_table(c.social_networks, 'Visits')}
<hr/> </div>
<p>Percentage of visits that were referred from these social networks</p> <div class="tab-pane" id="languages">
<form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> ${rickshaw_graph(c.languages_graph,'languages',mode='stack')}
<h4 class="ga-reports-heading">Show stats table for:</h4> <hr/>
${month_selector(c.month, c.months, c.day)} <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get">
</form> <h4 class="ga-reports-heading">Show stats table for:</h4>
${stat_table(c.social_networks, 'Visits')} ${month_selector(c.month, c.months, c.day)}
</div> </form>
<div class="tab-pane" id="languages"> <hr/>
${rickshaw_graph(c.languages_graph,'languages',mode='stack')} ${stat_table(c.languages)}
<hr/> </div>
<form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> <div class="tab-pane" id="country">
<h4 class="ga-reports-heading">Show stats table for:</h4> ${rickshaw_graph(c.country_graph,'country',mode='stack')}
${month_selector(c.month, c.months, c.day)} <hr/>
</form> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get">
${stat_table(c.languages)} <h4 class="ga-reports-heading">Show stats table for:</h4>
</div> ${month_selector(c.month, c.months, c.day)}
<div class="tab-pane" id="country"> </form>
${rickshaw_graph(c.country_graph,'country',mode='stack')} <hr/>
<hr/> ${stat_table(c.country)}
<form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> </div>
<h4 class="ga-reports-heading">Show stats table for:</h4> </div>
${month_selector(c.month, c.months, c.day)} </div>
</form>  
${stat_table(c.country)}  
</div>  
</div> </div>
</div> </div>
</div> </div>
   
</div> </div>
   
   
<py:def function="optional_footer"> <py:def function="optional_footer">
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
CKAN.GA_Reports.bind_sparklines(); CKAN.GA_Reports.bind_sparklines();
CKAN.GA_Reports.bind_sidebar(); CKAN.GA_Reports.bind_sidebar();
CKAN.GA_Reports.bind_month_selector(); CKAN.GA_Reports.bind_month_selector();
}); });
</script> </script>
</py:def> </py:def>
   
<xi:include href="../../layout.html" /> <xi:include href="../../layout.html" />
</html> </html>