mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 09:37:50 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
@@ -0,0 +1,41 @@
|
||||
package com.sbi.analytics
|
||||
{
|
||||
import libraries.uanalytics.tracker.WebTracker;
|
||||
import libraries.uanalytics.tracking.Configuration;
|
||||
|
||||
public class GATracker
|
||||
{
|
||||
|
||||
private static var _tracker:WebTracker;
|
||||
|
||||
private static var _eventTracker:WebTracker;
|
||||
|
||||
public function GATracker()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function init() : void
|
||||
{
|
||||
var _loc3_:Configuration = new Configuration();
|
||||
_loc3_.enableThrottling = true;
|
||||
_loc3_.forcePOST = true;
|
||||
_loc3_.forceSSL = true;
|
||||
var _loc1_:String = (gMainFrame.clientInfo.websiteURL as String).indexOf("stage") != -1 ? "UA-55037062-1" : "UA-16265056-4";
|
||||
var _loc2_:String = (gMainFrame.clientInfo.websiteURL as String).indexOf("stage") != -1 ? "UA-55037062-1" : "UA-16265056-1";
|
||||
_tracker = new WebTracker(_loc1_,_loc3_);
|
||||
_eventTracker = new WebTracker(_loc2_,_loc3_);
|
||||
}
|
||||
|
||||
public static function trackError(param1:String, param2:Boolean) : Boolean
|
||||
{
|
||||
return _tracker.exception(param1,param2);
|
||||
}
|
||||
|
||||
public static function trackEvent(param1:String, param2:String, param3:String = "", param4:int = -1) : Boolean
|
||||
{
|
||||
return _eventTracker.event(param1,param2,param3,param4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,489 @@
|
||||
package com.sbi.analytics
|
||||
{
|
||||
import com.sbi.debug.DebugUtility;
|
||||
import flash.events.DataEvent;
|
||||
import flash.events.Event;
|
||||
import flash.events.IOErrorEvent;
|
||||
import flash.events.SecurityErrorEvent;
|
||||
import flash.events.TimerEvent;
|
||||
import flash.external.ExternalInterface;
|
||||
import flash.net.Socket;
|
||||
import flash.utils.Dictionary;
|
||||
import flash.utils.Timer;
|
||||
|
||||
public class SBTracker
|
||||
{
|
||||
|
||||
public static const TYPE_NORMAL:int = 0;
|
||||
|
||||
public static const TYPE_EVENT:int = 1;
|
||||
|
||||
public static const TYPE_ERROR:int = 2;
|
||||
|
||||
private static var MAX_RETRIES:int = 3;
|
||||
|
||||
private static var _pageStack:Array;
|
||||
|
||||
private static var _batchTimer:Timer;
|
||||
|
||||
private static var _isExternalAvailable:Boolean;
|
||||
|
||||
private static var _couldNotConnect:Boolean;
|
||||
|
||||
private static var _pageView:String;
|
||||
|
||||
private static var _socket:Socket;
|
||||
|
||||
private static var _timeOffset:Number;
|
||||
|
||||
private static var _isFromLogin:Boolean;
|
||||
|
||||
private static var _retryLimit:int;
|
||||
|
||||
private static var _lastBatchCallback:Function;
|
||||
|
||||
private static var _trackingObjects:Dictionary;
|
||||
|
||||
private static var _latestTrackTimeStamp:Dictionary;
|
||||
|
||||
private static var _lastestDuration:Dictionary;
|
||||
|
||||
public function SBTracker()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function create() : void
|
||||
{
|
||||
if(ExternalInterface.available && gMainFrame.clientInfo.sbTrackerIp != -1)
|
||||
{
|
||||
_isExternalAvailable = true;
|
||||
ExternalInterface.addCallback("receiveClose",receiveClose);
|
||||
if(!isNaN(gMainFrame.clientInfo.currentTimestamp))
|
||||
{
|
||||
_timeOffset = gMainFrame.clientInfo.currentTimestamp - new Date().valueOf() / 1000;
|
||||
}
|
||||
else
|
||||
{
|
||||
_timeOffset = 0;
|
||||
}
|
||||
_pageView = null;
|
||||
_pageStack = [];
|
||||
_socket = new Socket();
|
||||
_socket.addEventListener("close",closeHandler);
|
||||
_socket.addEventListener("connect",connectHandler);
|
||||
_socket.addEventListener("data",dataHandler);
|
||||
_socket.addEventListener("ioError",ioErrorHandler);
|
||||
_socket.addEventListener("securityError",securityErrorHandler);
|
||||
_trackingObjects = new Dictionary();
|
||||
_trackingObjects[0] = [];
|
||||
_trackingObjects[1] = [];
|
||||
_trackingObjects[2] = [];
|
||||
_latestTrackTimeStamp = new Dictionary();
|
||||
_latestTrackTimeStamp[0] = 0;
|
||||
_lastestDuration = new Dictionary();
|
||||
_lastestDuration[0] = 0;
|
||||
_batchTimer = new Timer(10000);
|
||||
_batchTimer.addEventListener("timer",onBatchTimer,false,0,true);
|
||||
_batchTimer.start();
|
||||
}
|
||||
}
|
||||
|
||||
public static function receiveClose() : String
|
||||
{
|
||||
_batchTimer.stop();
|
||||
_batchTimer.removeEventListener("timer",onBatchTimer);
|
||||
if(_pageView != null)
|
||||
{
|
||||
setupPageView();
|
||||
return _pageView;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static function onError() : void
|
||||
{
|
||||
if(_isExternalAvailable)
|
||||
{
|
||||
ExternalInterface.call("reportAnalyticsError","Error Timeout",gMainFrame.clientInfo.sessionId);
|
||||
}
|
||||
DebugUtility.debugTrace("Sending analytics error");
|
||||
}
|
||||
|
||||
public static function trackPageview(param1:String, param2:int = -1, param3:int = 0, param4:Boolean = true) : void
|
||||
{
|
||||
var _loc6_:int = 0;
|
||||
var _loc5_:Number = NaN;
|
||||
if(_isExternalAvailable && !_couldNotConnect)
|
||||
{
|
||||
_isFromLogin = param2 != -1;
|
||||
if(_isFromLogin)
|
||||
{
|
||||
_loc6_ = 0;
|
||||
}
|
||||
else if(gMainFrame.clientInfo.dbUserId == undefined)
|
||||
{
|
||||
_loc6_ = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc6_ = int(gMainFrame.clientInfo.dbUserId);
|
||||
}
|
||||
if(_loc6_ > 0)
|
||||
{
|
||||
if(param4 && _loc6_ % gMainFrame.clientInfo.sbTrackerModulator != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
_loc5_ = Math.floor(new Date().valueOf() / 1000 + _timeOffset);
|
||||
if(gMainFrame.clientInfo.sessionId == undefined && _isFromLogin)
|
||||
{
|
||||
gMainFrame.clientInfo.sessionId = Math.floor(Math.random() * (2147483647 + 1));
|
||||
}
|
||||
_trackingObjects[param3].push(new URIObj(param1,_loc5_,_isFromLogin,param3,_trackingObjects[param3].length,param4));
|
||||
}
|
||||
}
|
||||
|
||||
public static function handleErrorTracking(param1:int, param2:int, param3:int, param4:int, param5:Number, param6:String, param7:String, param8:int, param9:int) : void
|
||||
{
|
||||
var _loc11_:Number = NaN;
|
||||
var _loc10_:Object = null;
|
||||
if(ExternalInterface.available && gMainFrame.clientInfo.sbTrackerIp != -1)
|
||||
{
|
||||
_loc11_ = Number(gMainFrame.clientInfo.sessionId);
|
||||
if(gMainFrame.clientInfo.sessionId == undefined)
|
||||
{
|
||||
_loc11_ = Math.round(Math.random() * (2147483647 + 1));
|
||||
}
|
||||
if(gMainFrame.clientInfo.dbUserId == undefined)
|
||||
{
|
||||
gMainFrame.clientInfo.dbUserId = param1;
|
||||
}
|
||||
_loc10_ = {
|
||||
"userId":(gMainFrame.clientInfo.dbUserId == undefined ? param1 : null),
|
||||
"order":param3,
|
||||
"duration":(param4 == -1 ? null : param4),
|
||||
"sessionId":(param5 == -1 ? _loc11_ : null)
|
||||
};
|
||||
_trackingObjects[2].push(new URIObj(param6 + "#" + param7 + "#" + param8 + "#" + param9,param2 == -1 ? Math.floor(new Date().valueOf() / 1000 + _timeOffset) : param2,_isFromLogin,2,_trackingObjects[2].length,false,_loc10_));
|
||||
onBatchTimer(null);
|
||||
}
|
||||
}
|
||||
|
||||
public static function handleOnKickOrLogout() : void
|
||||
{
|
||||
if(_isExternalAvailable && _pageView != null)
|
||||
{
|
||||
ExternalInterface.call("handleLogout",_pageView);
|
||||
}
|
||||
}
|
||||
|
||||
public static function push(param1:int = 0) : void
|
||||
{
|
||||
var _loc2_:Array = null;
|
||||
var _loc3_:Object = null;
|
||||
if(_pageStack)
|
||||
{
|
||||
_loc2_ = _trackingObjects[param1];
|
||||
if(_loc2_.length > 0)
|
||||
{
|
||||
_loc3_ = _loc2_[_loc2_.length - 1].trackingObject;
|
||||
_pageStack.push(_loc3_.uri + "#" + _loc3_.uriParams + "#pop#" + _loc3_.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static function pop() : void
|
||||
{
|
||||
if(_pageStack && _pageStack.length)
|
||||
{
|
||||
trackPageview(_pageStack.pop());
|
||||
}
|
||||
}
|
||||
|
||||
public static function flush(param1:Boolean = false) : void
|
||||
{
|
||||
if(_pageStack && _pageStack.length)
|
||||
{
|
||||
if(param1)
|
||||
{
|
||||
trackPageview(_pageStack[0]);
|
||||
}
|
||||
_pageStack = [];
|
||||
}
|
||||
}
|
||||
|
||||
public static function completeLastTrackingBatch(param1:Function) : void
|
||||
{
|
||||
_lastBatchCallback = param1;
|
||||
if(_batchTimer)
|
||||
{
|
||||
_batchTimer.stop();
|
||||
if(_socket)
|
||||
{
|
||||
setupPageView(true);
|
||||
if(_pageView != null)
|
||||
{
|
||||
_batchTimer.reset();
|
||||
_socket.connect(gMainFrame.clientInfo.sbTrackerIp,5050);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_lastBatchCallback != null)
|
||||
{
|
||||
_lastBatchCallback();
|
||||
_lastBatchCallback = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getLastDuration(param1:int) : Number
|
||||
{
|
||||
return _lastestDuration[param1];
|
||||
}
|
||||
|
||||
public static function setLastDuration(param1:int, param2:Number) : void
|
||||
{
|
||||
_lastestDuration[param1] = param2;
|
||||
}
|
||||
|
||||
public static function getLastTimestamp(param1:int) : Number
|
||||
{
|
||||
return _latestTrackTimeStamp[param1];
|
||||
}
|
||||
|
||||
public static function setLastTimestamp(param1:int, param2:Number) : void
|
||||
{
|
||||
_latestTrackTimeStamp[param1] = param2;
|
||||
}
|
||||
|
||||
public static function getnextURIObjByType(param1:int, param2:int) : URIObj
|
||||
{
|
||||
var _loc3_:Array = _trackingObjects[param2];
|
||||
if(_loc3_.length > 0 && _loc3_.length > param1 + 1)
|
||||
{
|
||||
return _loc3_[param1 + 1];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static function getPreviousURIObjByType(param1:int, param2:int) : URIObj
|
||||
{
|
||||
var _loc3_:Array = _trackingObjects[param2];
|
||||
if(_loc3_.length > 0 && _loc3_.length > param1 - 1)
|
||||
{
|
||||
return _loc3_[param1 - 1];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static function findLatestTrackedURIObjByThrottleType(param1:Array, param2:Boolean) : URIObj
|
||||
{
|
||||
var _loc3_:int = 0;
|
||||
if(param1)
|
||||
{
|
||||
_loc3_ = param1.length - 1;
|
||||
while(_loc3_ >= 0)
|
||||
{
|
||||
if(param1[_loc3_].throttled == param2)
|
||||
{
|
||||
return param1[_loc3_];
|
||||
}
|
||||
_loc3_--;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static function onBatchTimer(param1:TimerEvent) : void
|
||||
{
|
||||
if(_socket)
|
||||
{
|
||||
setupPageView();
|
||||
if(_pageView != null)
|
||||
{
|
||||
_batchTimer.reset();
|
||||
_socket.connect(gMainFrame.clientInfo.sbTrackerIp,5050);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(_lastBatchCallback != null)
|
||||
{
|
||||
_lastBatchCallback();
|
||||
_lastBatchCallback = null;
|
||||
}
|
||||
}
|
||||
|
||||
private static function setupPageView(param1:Boolean = false) : void
|
||||
{
|
||||
var _loc4_:String = null;
|
||||
var _loc3_:int = 0;
|
||||
var _loc2_:URIObj = null;
|
||||
var _loc6_:int = 0;
|
||||
var _loc5_:Array = null;
|
||||
var _loc8_:Boolean = false;
|
||||
if(_pageView == null)
|
||||
{
|
||||
_loc4_ = "";
|
||||
for(var _loc7_:String in _trackingObjects)
|
||||
{
|
||||
_loc3_ = int(_loc7_);
|
||||
_loc5_ = _trackingObjects[_loc3_];
|
||||
if(_loc5_.length > 0)
|
||||
{
|
||||
if(gMainFrame.clientInfo.sessionId != undefined)
|
||||
{
|
||||
_loc6_ = 0;
|
||||
for(; _loc6_ < _loc5_.length; _loc6_++)
|
||||
{
|
||||
_loc2_ = _loc5_[_loc6_];
|
||||
if(!_loc2_.hasTrackedLastOne)
|
||||
{
|
||||
if(_loc2_.throttled)
|
||||
{
|
||||
if(!_loc2_.isFromLogin)
|
||||
{
|
||||
if(gMainFrame.clientInfo.dbUserId % gMainFrame.clientInfo.sbTrackerModulator != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if(gMainFrame.clientInfo.sessionId % gMainFrame.clientInfo.sbTrackerModulator != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
_loc4_ += _loc2_.pageView;
|
||||
}
|
||||
}
|
||||
if(param1)
|
||||
{
|
||||
if(_loc2_.throttled)
|
||||
{
|
||||
if(!_loc2_.isFromLogin)
|
||||
{
|
||||
if(gMainFrame.clientInfo.dbUserId % gMainFrame.clientInfo.sbTrackerModulator != 0)
|
||||
{
|
||||
_loc8_ = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc8_ = true;
|
||||
}
|
||||
}
|
||||
else if(gMainFrame.clientInfo.sessionId % gMainFrame.clientInfo.sbTrackerModulator != 0)
|
||||
{
|
||||
_loc8_ = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc8_ = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc8_ = true;
|
||||
}
|
||||
if(_loc8_)
|
||||
{
|
||||
_loc4_ += _loc2_.ownPageView;
|
||||
}
|
||||
_trackingObjects[_loc3_] = [];
|
||||
_loc5_ = [];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_loc3_ == 1)
|
||||
{
|
||||
_loc5_.splice(0,_loc5_.length);
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc5_.splice(0,_loc5_.length - 1);
|
||||
if(_loc5_[0].pageView != "")
|
||||
{
|
||||
_loc5_[0].hasTrackedLastOne = true;
|
||||
}
|
||||
}
|
||||
_loc2_.index = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_loc4_ != "")
|
||||
{
|
||||
_pageView = _loc4_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static function closeHandler(param1:Event) : void
|
||||
{
|
||||
_socket.close();
|
||||
}
|
||||
|
||||
private static function connectHandler(param1:Event) : void
|
||||
{
|
||||
DebugUtility.debugTrace(_pageView);
|
||||
_socket.writeUTFBytes(_pageView);
|
||||
_pageView = null;
|
||||
_socket.flush();
|
||||
_socket.close();
|
||||
_retryLimit = 0;
|
||||
_batchTimer.start();
|
||||
if(_lastBatchCallback != null)
|
||||
{
|
||||
_lastBatchCallback();
|
||||
_lastBatchCallback = null;
|
||||
}
|
||||
}
|
||||
|
||||
private static function dataHandler(param1:DataEvent) : void
|
||||
{
|
||||
}
|
||||
|
||||
private static function ioErrorHandler(param1:IOErrorEvent) : void
|
||||
{
|
||||
if(_lastBatchCallback != null)
|
||||
{
|
||||
_lastBatchCallback();
|
||||
_lastBatchCallback = null;
|
||||
}
|
||||
if(_retryLimit < MAX_RETRIES)
|
||||
{
|
||||
_retryLimit = _retryLimit + 1;
|
||||
DebugUtility.debugTrace("IO error - retrying analytics connection");
|
||||
_socket.connect(gMainFrame.clientInfo.sbTrackerIp,5050);
|
||||
return;
|
||||
}
|
||||
_couldNotConnect = true;
|
||||
}
|
||||
|
||||
private static function securityErrorHandler(param1:SecurityErrorEvent) : void
|
||||
{
|
||||
if(_lastBatchCallback != null)
|
||||
{
|
||||
_lastBatchCallback();
|
||||
_lastBatchCallback = null;
|
||||
}
|
||||
if(_retryLimit < MAX_RETRIES)
|
||||
{
|
||||
DebugUtility.debugTrace("Security error - retrying analytics connection");
|
||||
_retryLimit = _retryLimit + 1;
|
||||
_socket.connect(gMainFrame.clientInfo.sbTrackerIp,5050);
|
||||
return;
|
||||
}
|
||||
if(_batchTimer)
|
||||
{
|
||||
_batchTimer.stop();
|
||||
_batchTimer.removeEventListener("timer",onBatchTimer);
|
||||
}
|
||||
_couldNotConnect = true;
|
||||
_pageView = null;
|
||||
_socket = null;
|
||||
onError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
package com.sbi.analytics
|
||||
{
|
||||
import com.sbi.debug.DebugUtility;
|
||||
import flash.utils.getTimer;
|
||||
|
||||
public class URIObj
|
||||
{
|
||||
|
||||
private var _type:int;
|
||||
|
||||
private var _trackingObject:Object;
|
||||
|
||||
private var _containsAnUndefined:Boolean;
|
||||
|
||||
private var _pageView:String;
|
||||
|
||||
private var _userId:int;
|
||||
|
||||
private var _isFromLogin:Boolean;
|
||||
|
||||
private var _throttled:Boolean;
|
||||
|
||||
private var _index:int;
|
||||
|
||||
private var _hasTrackedLastOne:Boolean;
|
||||
|
||||
public function URIObj(param1:String, param2:Number, param3:Boolean, param4:int, param5:int, param6:Boolean, param7:Object = null)
|
||||
{
|
||||
var _loc12_:int = 0;
|
||||
var _loc10_:URIObj = null;
|
||||
super();
|
||||
param1 = param1.replace(/[',]/g,"");
|
||||
var _loc9_:Array = param1.split(/#/i);
|
||||
_isFromLogin = param3;
|
||||
_throttled = param6;
|
||||
_type = param4;
|
||||
_index = param5;
|
||||
if(param7 && param7.userId)
|
||||
{
|
||||
_userId = param7.userId;
|
||||
}
|
||||
else
|
||||
{
|
||||
_userId = param3 ? 0 : (gMainFrame.clientInfo.dbUserId == undefined ? -1 : gMainFrame.clientInfo.dbUserId);
|
||||
}
|
||||
if(param7 && param7.sessionId)
|
||||
{
|
||||
_loc12_ = int(param7.sessionId);
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc12_ = int(gMainFrame.clientInfo.sessionId);
|
||||
}
|
||||
var _loc8_:int = -1;
|
||||
if(param7 && param7.duration)
|
||||
{
|
||||
_loc8_ = int(param7.duration);
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc10_ = SBTracker.getPreviousURIObjByType(param5,param4);
|
||||
if(_loc10_)
|
||||
{
|
||||
_loc10_.setTimeAndDurationAndOrder();
|
||||
}
|
||||
}
|
||||
if(_loc8_ == -1 && param4 == 1)
|
||||
{
|
||||
_loc8_ = 0;
|
||||
}
|
||||
_trackingObject = {
|
||||
"userId":_userId,
|
||||
"time":param2,
|
||||
"order":(param7 && param7.order ? param7.order : 0),
|
||||
"duration":_loc8_,
|
||||
"sessionId":_loc12_,
|
||||
"uri":_loc9_[0],
|
||||
"uriParams":(_loc9_[1] != null ? _loc9_[1] : ""),
|
||||
"pop":(_loc9_[2] != null && _loc9_[2] == "pop" ? 1 : 0),
|
||||
"value":(_loc9_[3] != null ? _loc9_[3] : ""),
|
||||
"type":param4
|
||||
};
|
||||
var _loc11_:String = "userId: " + _trackingObject.userId + "\n" + "time: " + _trackingObject.time + "\n" + "order: " + _trackingObject.order + "\n" + "duration: " + _trackingObject.duration + "\n" + "sessionId: " + _trackingObject.sessionId + "\n" + "URI: " + _trackingObject.uri + "\n" + "uriParams: " + _trackingObject.uriParams + "\n" + "pop: " + _trackingObject.pop + "\n" + "value: " + _trackingObject.value + "\ntype: " + _trackingObject.type;
|
||||
DebugUtility.debugTrace(_loc11_);
|
||||
}
|
||||
|
||||
public function destroy() : void
|
||||
{
|
||||
_trackingObject = null;
|
||||
}
|
||||
|
||||
public function get isFromLogin() : Boolean
|
||||
{
|
||||
return _isFromLogin;
|
||||
}
|
||||
|
||||
public function get trackingObject() : Object
|
||||
{
|
||||
return _trackingObject;
|
||||
}
|
||||
|
||||
public function get throttled() : Boolean
|
||||
{
|
||||
return _throttled;
|
||||
}
|
||||
|
||||
public function set index(param1:int) : void
|
||||
{
|
||||
_index = param1;
|
||||
}
|
||||
|
||||
public function setTimeAndDurationAndOrder() : void
|
||||
{
|
||||
var _loc3_:URIObj = null;
|
||||
var _loc1_:Number = SBTracker.getLastTimestamp(_type);
|
||||
var _loc4_:Boolean = _trackingObject.time - _loc1_ == 0;
|
||||
SBTracker.setLastTimestamp(_type,_trackingObject.time);
|
||||
if(_loc4_ && _trackingObject.order == 0)
|
||||
{
|
||||
_loc3_ = SBTracker.getPreviousURIObjByType(_index,_type);
|
||||
if(_loc3_)
|
||||
{
|
||||
_trackingObject.order = _loc3_.trackingObject.order + 1;
|
||||
}
|
||||
}
|
||||
var _loc2_:Number = SBTracker.getLastDuration(_type);
|
||||
var _loc5_:Number = getTimer();
|
||||
SBTracker.setLastDuration(_type,_loc5_);
|
||||
if(_trackingObject.duration == -1)
|
||||
{
|
||||
_trackingObject.duration = Math.round((_loc5_ - _loc2_) / 100);
|
||||
}
|
||||
}
|
||||
|
||||
public function get pageView() : String
|
||||
{
|
||||
if(_trackingObject.duration != -1)
|
||||
{
|
||||
return (_isFromLogin ? _userId : gMainFrame.clientInfo.dbUserId) + "\n" + _trackingObject.time + "\n" + _trackingObject.order + "\n" + _trackingObject.duration + "\n" + _trackingObject.sessionId + "\n" + _trackingObject.uri + "\n" + _trackingObject.uriParams + "\n" + _trackingObject.pop + "\n" + _trackingObject.value + "\n" + _trackingObject.type + "\n";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public function get ownPageView() : String
|
||||
{
|
||||
setTimeAndDurationAndOrder();
|
||||
return pageView;
|
||||
}
|
||||
|
||||
public function get hasTrackedLastOne() : Boolean
|
||||
{
|
||||
return _hasTrackedLastOne;
|
||||
}
|
||||
|
||||
public function set hasTrackedLastOne(param1:Boolean) : void
|
||||
{
|
||||
_hasTrackedLastOne = param1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user