Permalink
Browse files

Add session timestamp metric

  • Loading branch information...
1 parent 5a39241 commit 809fc50a161d3bdf9547f25699b535e3134aef3b @aaronm67 aaronm67 committed Apr 4, 2012
Showing with 47 additions and 0 deletions.
  1. +38 −0 modules/base/metrics/timestamp.php
  2. +9 −0 modules/base/module.php
@@ -0,0 +1,38 @@
+<?php
+//
+// Open Web Analytics - An Open Source Web Analytics Framework
+//
+// Copyright 2006 Peter Adams. All rights reserved.
+//
+// Licensed under GPL v2.0 http://www.gnu.org/copyleft/gpl.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// $Id$
+//
+
+/**
+ * Session Timestamp metric
+ *
+ * @license http://www.gnu.org/copyleft/gpl.html GPL v2.0
+ */
+
+class owa_timestamp extends owa_metric {
+
+ function __construct() {
+ $this->setName('timestamp');
+ $this->setLabel('timestamp');
+ $this->setEntity('base.session');
+ //$this->setEntity('base.request');
+ $this->setColumn('timestamp');
+ $this->setSelect(sprintf("%s", $this->getColumn()));
+ $this->setDataType('integer');
+ return parent::__construct();
+ }
+}
+
+?>
View
@@ -292,6 +292,15 @@ function registerMetrics() {
);
$this->registerMetric(
+ 'timestamp',
+ 'base.timestamp',
+ '',
+ 'Timestamp',
+ 'Timestamp',
+ 'Timestamp'
+ );
+
+ $this->registerMetric(
'pageViews',
array(
'base.pageViews',

0 comments on commit 809fc50

Please sign in to comment.