|
|
1 |
<div class="owa_reportSectionContent">
|
|
|
2 |
<div id="trend-title" class="owa_reportSectionHeader"></div>
|
|
|
3 |
<div id="trend-chart"></div><BR>
|
|
|
4 |
<div id="trend-metrics" style="height:auto;width:auto;"></div>
|
|
|
5 |
<div style="clear:both;"></div>
|
|
|
6 |
<script>
|
|
|
7 |
|
|
|
8 |
var trendurl = '<?php echo $this->makeApiLink(array('do' => 'getResultSet',
|
|
|
9 |
'metrics' => $metrics,
|
|
|
10 |
'dimensions' => 'date',
|
|
|
11 |
'sort' => 'date',
|
|
|
12 |
'format' => 'json',
|
|
|
13 |
),true);?>';
|
|
|
14 |
|
|
|
15 |
var trend = new OWA.resultSetExplorer('trend-chart');
|
|
|
16 |
trend.options.sparkline.metric = 'visits';
|
|
|
17 |
<?php if ($trendTitle):?>
|
|
|
18 |
trend.asyncQueue.push(['renderTemplate', '<?php echo $trendTitle;?>', {d: trend}, 'replace', 'trend-title']);
|
|
|
19 |
<?php endif;?>
|
|
|
20 |
trend.asyncQueue.push(['makeAreaChart', [{x: 'date', y: '<?php echo $trendChartMetric; ?>'}], 'trend-chart']);
|
|
|
21 |
trend.asyncQueue.push(['makeMetricBoxes' , 'trend-metrics']);
|
|
|
22 |
trend.load(trendurl);
|
|
|
23 |
|
|
|
24 |
</script>
|
|
|
25 |
|
|
|
26 |
</div>
|
|
|
27 |
|
|
|
28 |
<div class="owa_reportSectionContent">
|
|
|
29 |
<div class="owa_reportSectionHeader">Top Inbound Link Text</div>
|
|
|
30 |
<div id="dimension-grid"></div>
|
|
|
31 |
|
|
|
32 |
<script>
|
|
|
33 |
var dimurl = '<?php echo $this->makeApiLink(array('do' => 'getResultSet',
|
|
|
34 |
'metrics' => $metrics,
|
|
|
35 |
'dimensions' => $dimensions,
|
|
|
36 |
'sort' => $sort,
|
|
|
37 |
'resultsPerPage' => $resultsPerPage,
|
|
|
38 |
'format' => 'json',
|
|
|
39 |
),true);?>';
|
|
|
40 |
|
|
|
41 |
var dim = new OWA.resultSetExplorer('dimension-grid');
|
|
|
42 |
|
|
|
43 |
<?php if (!empty($dimensionLink)):?>
|
|
|
44 |
var link = '<?php echo $this->makeLink($dimensionLink['template'], true);?>';
|
|
|
45 |
dim.addLinkToColumn('<?php echo $dimensionLink['linkColumn'];?>', link, ['<?php echo $dimensionLink['valueColumns'];?>']);
|
|
|
46 |
<?php endif; ?>
|
|
|
47 |
dim.asyncQueue.push(['refreshGrid']);
|
|
|
48 |
dim.load(dimurl);
|
|
|
49 |
</script>
|
|
|
50 |
|
|
|
51 |
</div>
|
|
|
52 |
|
|
|
53 |
<script type="text/x-jqote-template" id="metricInfobox">
|
|
|
54 |
<![CDATA[
|
|
|
55 |
|
|
|
56 |
<div class="owa_metricInfobox">
|
|
|
57 |
<p class="owa_metricInfoboxLabel"><%= this.label %></p>
|
|
|
58 |
<p class="owa_metricInfoboxLargeNumber"><%= this.value %></p>
|
|
|
59 |
<p id='<%= this.dom_id %>-sparkline'></p>
|
|
|
60 |
</div>
|
|
|
61 |
|
|
|
62 |
]]>
|
|
|
63 |
</script>
|
|
|
64 |
|