2011-02-22 02:49:20
maxious
1
<div class="owa_reportSectionContent">
2
<div id="trend-chart" style="height:125px; min-width:400px;padding-right:30px;"></div>
3
</div>
4
<div class="owa_reportSectionContent">
5
<div id="visits-headline" class="owa_reportSectionHeader"></div>
6
7
<table style="width:100%;margin-top:-15px;">
8
<TR>
9
<TD valign="top" style="width:50%;">
10
<div id="traffic-sources" style="width:250px;"></div>
11
</TD>
12
13
<TD valign="top" style="width:50%;">
14
<div id="trend-metrics"></div>
15
</TD>
16
17
</TR>
18
</table>
19
</div>
20
21
<table style="width:auto;margin-top:;">
22
<tr>
23
<td valign="top" style="width:50%;">
24
25
<div class="owa_reportSectionContent">
26
27
<div class="owa_reportSectionContent" style="min-width:350px;">
28
<div class="owa_reportSectionHeader">Top Sources</div>
29
30
<div id="top-sources"></div>
31
<div class="owa_genericHorizonalList owa_moreLinks">
32
<UL>
33
<LI>
34
<a href="<?php echo $this->makeLink(array('do' => 'base.reportSources'), true);?>">View Full Report »</a>
35
</LI>
36
</UL>
37
</div>
38
</div>
39
40
<div class="owa_reportSectionHeader">Related Reports</div>
41
<div class="relatedReports">
42
<UL>
43
<LI>
44
<a href="<?php echo $this->makeLink(array('do' => 'base.reportSearchEngines'));?>">Search Engines</a></span> - See which search engines your visitors are coming from.
45
</LI>
46
<LI>
47
<a href="<?php echo $this->makeLink(array('do' => 'base.reportKeywords'));?>">Keywords</a></span> - See what keywords your visitor are using to find your web site.
48
</LI>
49
<LI>
50
<a href="<?php echo $this->makeLink(array('do' => 'base.reportReferringSites'));?>">Referring Web Sites</a></span> - See which web sites are linking to your web site.
51
</LI>
52
<LI>
53
<a href="<?php echo $this->makeLink(array('do' => 'base.reportAnchortext'));?>">Inbound Link Text</a></span> - See what words Referring Web Sites use to describe your web site.
54
</LI>
55
</UL>
56
</div>
57
</div>
58
59
<div class="owa_reportSectionContent" style="min-width:350px;">
60
<div class="owa_reportSectionHeader">Top Keywords</div>
61
62
<div id="top-keywords"></div>
63
<div class="owa_genericHorizonalList owa_moreLinks">
64
<UL>
65
<LI>
66
<a href="<?php echo $this->makeLink(array('do' => 'base.reportKeywords'), true);?>">View Full Report »</a>
67
</LI>
68
</UL>
69
</div>
70
</div>
71
72
</td>
73
74
<td valign="top" style="width:50%;">
75
76
<div class="owa_reportSectionContent" style="min-width:350px;">
77
<div class="owa_reportSectionHeader">Top Referrals</div>
78
<div id="top-referrals"></div>
79
<div class="owa_genericHorizonalList owa_moreLinks">
80
<UL>
81
<LI>
82
<a href="<?php echo $this->makeLink(array('do' => 'base.reportReferringSites'), true);?>">View Full Report »</a>
83
</LI>
84
</UL>
85
</div>
86
</div>
87
</td>
88
</tr>
89
</table>
90
91
92
93
94
<script>
95
//OWA.setSetting('debug', true);
96
97
var aurl = '<?php echo $this->makeApiLink(array('do' => 'getResultSet',
98
'metrics' => 'visits',
99
'dimensions' => 'date',
100
'sort' => 'date',
101
'format' => 'json',
102
'constraints' => urlencode($this->substituteValue('siteId==%s,','siteId'))), true);?>';
103
104
OWA.items.rsh = new OWA.resultSetExplorer('trend-chart');
105
OWA.items.rsh.asyncQueue.push(['makeAreaChart', [{x:'date',y:'visits'}]]);
106
OWA.items.rsh.asyncQueue.push(['renderTemplate','#visits-headline-template', {data: OWA.items.rsh}, 'replace', 'visits-headline']);
107
OWA.items.rsh.load(aurl);
108
109
var tturl = '<?php echo $this->makeApiLink(array('do' => 'getResultSet',
110
'metrics' => 'visits',
111
'dimensions' => 'date,medium',
112
'sort' => 'date',
113
'format' => 'json',
114
'constraints' => urlencode($this->substituteValue('siteId==%s,', 'siteId').',medium=@organic')),true);?>';
115
116
OWA.items.tt = new OWA.resultSetExplorer('trend-metrics');
117
OWA.items.tt.asyncQueue.push(['makeMetricBoxes','','','Visits From Search Engines', '',function(row) {if (row.medium.value === 'organic-search') return true;}]);
118
OWA.items.tt.load(tturl);
119
120
var tt1url = '<?php echo $this->makeApiLink(array('do' => 'getResultSet',
121
'metrics' => 'visits',
122
'dimensions' => 'date',
123
'sort' => 'date',
124
'format' => 'json',
125
'constraints' => urlencode($this->substituteValue('siteId==%s,', 'siteId')).'medium==direct'),true);?>';
126
127
var tt1 = new OWA.resultSetExplorer('trend-metrics');
128
tt1.asyncQueue.push(['makeMetricBoxes','','','Visits From Direct Navigation']);
129
tt1.load(tt1url);
130
131
132
var tt2url = '<?php echo $this->makeApiLink(array('do' => 'getResultSet',
133
'metrics' => 'visits',
134
'dimensions' => 'date',
135
'sort' => 'date',
136
'format' => 'json',
137
'constraints' => urlencode($this->substituteValue('siteId==%s,','siteId')).'medium==referral'),true);?>';
138
139
OWA.items.tt2 = new OWA.resultSetExplorer('trend-metrics');
140
141
OWA.items.tt2.asyncQueue.push(['makeMetricBoxes','','','Visits From Referrals']);
142
OWA.items.tt2.load(tt2url);
143
144
var vmurl = '<?php echo $this->makeApiLink(array('do' => 'getResultSet',
145
'metrics' => 'visits',
146
'dimensions' => 'medium',
147
'sort' => 'visits-',
148
'format' => 'json',
149
'constraints' => urlencode($this->substituteValue('siteId==%s,','siteId'))),true);?>';
150
151
OWA.items.vm = new OWA.resultSetExplorer('traffic-sources');
152
OWA.items.vm.options.pieChart.metric = 'visits';
153
OWA.items.vm.options.pieChart.dimension = 'medium';
154
OWA.items.vm.options.chartWidth = '300px';
155
OWA.items.vm.asyncQueue.push(['makePieChart']);
156
OWA.items.vm.load(vmurl);
157
158
159
var topkeywordsurl = '<?php echo $this->makeApiLink(array('do' => 'getResultSet',
160
'metrics' => 'visits',
161
'dimensions' => 'referralSearchTerms',
162
'sort' => 'visits-',
163
'format' => 'json',
164
'resultsPerPage' => 25,
165
'constraints' => urlencode($this->substituteValue('siteId==%s,','siteId'))), true);?>';
166
167
OWA.items.topkeywords = new OWA.resultSetExplorer('top-keywords');
168
OWA.items.topkeywords.addLinkToColumn('referralSearchTerms', '<?php echo $this->makeLink(array('do' => 'base.reportKeywordDetail', 'referralSearchTerms' => '%s'), true);?>', ['referralSearchTerms']);
169
OWA.items.topkeywords.asyncQueue.push(['refreshGrid']);
170
OWA.items.topkeywords.load(topkeywordsurl);
171
172
var topreferralsurl = '<?php echo $this->makeApiLink(array('do' => 'getResultSet',
173
'metrics' => 'visits',
174
'dimensions' => 'referralPageUrl',
175
'sort' => 'visits-',
176
'format' => 'json',
177
'resultsPerPage' => 25,
178
'constraints' => urlencode($this->substituteValue('siteId==%s,','siteId'))), true);?>';
179
180
OWA.items.topreferrals = new OWA.resultSetExplorer('top-referrals');
181
OWA.items.topreferrals.addLinkToColumn('referralPageUrl', '<?php echo $this->makeLink(array('do' => 'base.reportReferralDetail', 'referralPageUrl' => '%s'),true);?>', ['referralPageUrl']);
182
OWA.items.topreferrals.asyncQueue.push(['refreshGrid', 'top-referrals']);
183
OWA.items.topreferrals.load(topreferralsurl);
184
185
var topsources_url = '<?php echo $this->makeApiLink(array(
186
'do' => 'getResultSet',
187
'metrics' => 'visits',
188
'dimensions' => 'source,medium',
189
'sort' => 'visits-',
190
'format' => 'json',
191
'resultsPerPage' => 25,
192
'constraints' => urlencode($this->substituteValue('siteId==%s,','siteId'))), true);?>';
193
194
OWA.items.topsources = new OWA.resultSetExplorer('top-sources');
195
OWA.items.topsources.addLinkToColumn('source', '<?php echo $this->makeLink(array('do' => 'base.reportSourceDetail', 'source' => '%s' , 'medium' => '%s'),true);?>', ['source', 'medium']);
196
OWA.items.topsources.asyncQueue.push(['refreshGrid', 'top-sources']);
197
OWA.items.topsources.load(topsources_url);
198
199
200
</script>
201
202
<?php require_once('js_report_templates.php');?>
203
204
<script type="text/x-jqote-template" id="visits-headline-template">
205
<![CDATA[
206
There were <*= this.data.resultSet.aggregates.visits.formatted_value *> <* if (this.data.resultSet.aggregates.visits.value > 1) {this.label = 'visits';} else