--- a/busui/stop.php +++ b/busui/stop.php @@ -3,9 +3,23 @@ $url = $APIurl."/json/stop?stop_id=".$_REQUEST['stopid']; $stop = json_decode(getPage($url)); -include_header("Trips passing ".$stop[1]); +include_header($stop[1],"stop"); +if (isMetricsOn()) { +// Create a new Instance of the tracker +$owa = new owa_php($config); +// Set the ID of the site being tracked +$owa->setSiteId('bus.lambdacomplex.org'); +// Create a new event object +$event = $owa->makeEvent(); +// Set the Event Type, in this case a "video_play" +$event->setEventType('view_stop'); +// Set a property +$event->set('stop_id',$_REQUEST['stopid']); +// Track the event +$owa->trackEvent($event); + } +timePlaceSettings(); echo '<div data-role="content" class="ui-content" role="main"><p>'.staticmap(Array(0 => Array($stop[2],$stop[3]))).'</p>'; -// change date/time/service_period echo ' <ul data-role="listview" data-inset="true">'; $url = $APIurl."/json/stoptrips?stop=".$_REQUEST['stopid']."&time=".midnight_seconds()."&service_period=".service_period(); $trips = json_decode(getPage($url));