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,9 @@
|
||||
package libraries.uanalytics.tracking
|
||||
{
|
||||
public interface AnalyticsSender
|
||||
{
|
||||
|
||||
function send(param1:HitModel) : void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package libraries.uanalytics.tracking
|
||||
{
|
||||
import flash.utils.Dictionary;
|
||||
|
||||
public interface AnalyticsTracker
|
||||
{
|
||||
|
||||
function get trackingId() : String;
|
||||
|
||||
function get clientId() : String;
|
||||
|
||||
function get config() : Configuration;
|
||||
|
||||
function send(param1:String = null, param2:Dictionary = null) : Boolean;
|
||||
|
||||
function pageview(param1:String, param2:String = "") : Boolean;
|
||||
|
||||
function screenview(param1:String, param2:Dictionary = null) : Boolean;
|
||||
|
||||
function event(param1:String, param2:String, param3:String = "", param4:int = -1) : Boolean;
|
||||
|
||||
function transaction(param1:String, param2:String = "", param3:Number = 0, param4:Number = 0, param5:Number = 0, param6:String = "") : Boolean;
|
||||
|
||||
function item(param1:String, param2:String, param3:Number = 0, param4:int = 0, param5:String = "", param6:String = "", param7:String = "") : Boolean;
|
||||
|
||||
function social(param1:String, param2:String, param3:String) : Boolean;
|
||||
|
||||
function exception(param1:String = "", param2:Boolean = true) : Boolean;
|
||||
|
||||
function timing(param1:String, param2:String, param3:int, param4:String = "", param5:Dictionary = null) : Boolean;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package libraries.uanalytics.tracking
|
||||
{
|
||||
public class Configuration
|
||||
{
|
||||
|
||||
public static var SDKversion:String = "as3uanalytics1";
|
||||
|
||||
private var _endpoint:String = "http://www.google-analytics.com/collect";
|
||||
|
||||
private var _secureEndpoint:String = "https://ssl.google-analytics.com/collect";
|
||||
|
||||
private var _maxGETlength:uint = 2000;
|
||||
|
||||
private var _maxPOSTlength:uint = 8192;
|
||||
|
||||
private var _storageName:String = "_ga";
|
||||
|
||||
public var senderType:String = "";
|
||||
|
||||
public var enableErrorChecking:Boolean = false;
|
||||
|
||||
public var enableThrottling:Boolean = true;
|
||||
|
||||
public var enableSampling:Boolean = true;
|
||||
|
||||
public var enableCacheBusting:Boolean = false;
|
||||
|
||||
public var forceSSL:Boolean = false;
|
||||
|
||||
public var forcePOST:Boolean = false;
|
||||
|
||||
public var sampleRate:Number = 100;
|
||||
|
||||
public var anonymizeIp:Boolean = false;
|
||||
|
||||
public var overrideIpAddress:String = "";
|
||||
|
||||
public var overrideUserAgent:String = "";
|
||||
|
||||
public var overrideGeographicalId:String = "";
|
||||
|
||||
public function Configuration()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function get endpoint() : String
|
||||
{
|
||||
return _endpoint;
|
||||
}
|
||||
|
||||
public function get secureEndpoint() : String
|
||||
{
|
||||
return _secureEndpoint;
|
||||
}
|
||||
|
||||
public function get maxGETlength() : uint
|
||||
{
|
||||
return _maxGETlength;
|
||||
}
|
||||
|
||||
public function get maxPOSTlength() : uint
|
||||
{
|
||||
return _maxPOSTlength;
|
||||
}
|
||||
|
||||
public function get storageName() : String
|
||||
{
|
||||
return _storageName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package libraries.uanalytics.tracking
|
||||
{
|
||||
import flash.utils.Dictionary;
|
||||
|
||||
public class HitModel
|
||||
{
|
||||
|
||||
private var _data:Dictionary;
|
||||
|
||||
private var _metadata:Metadata;
|
||||
|
||||
public function HitModel()
|
||||
{
|
||||
super();
|
||||
_metadata = new Metadata();
|
||||
clear();
|
||||
}
|
||||
|
||||
public function set(param1:String, param2:String) : void
|
||||
{
|
||||
_data[_metadata.getHitModelKey(param1)] = param2;
|
||||
}
|
||||
|
||||
public function get(param1:String) : String
|
||||
{
|
||||
return _data[_metadata.getHitModelKey(param1)];
|
||||
}
|
||||
|
||||
public function add(param1:HitModel) : void
|
||||
{
|
||||
for(var _loc2_:String in param1._data)
|
||||
{
|
||||
_data[_loc2_] = param1._data[_loc2_];
|
||||
}
|
||||
}
|
||||
|
||||
public function clone() : HitModel
|
||||
{
|
||||
var _loc1_:HitModel = new HitModel();
|
||||
for(var _loc2_:String in _data)
|
||||
{
|
||||
_loc1_._data[_loc2_] = _data[_loc2_];
|
||||
}
|
||||
return _loc1_;
|
||||
}
|
||||
|
||||
public function clear() : void
|
||||
{
|
||||
_data = new Dictionary();
|
||||
}
|
||||
|
||||
public function getFieldNames() : Vector.<String>
|
||||
{
|
||||
var _loc1_:Vector.<String> = new Vector.<String>();
|
||||
for(var _loc2_:String in _data)
|
||||
{
|
||||
_loc1_.push(_loc2_);
|
||||
}
|
||||
return _loc1_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package libraries.uanalytics.tracking
|
||||
{
|
||||
import flash.utils.ByteArray;
|
||||
import libraries.uanalytics.utils.crc32;
|
||||
import libraries.uanalytics.utils.isDigit;
|
||||
|
||||
public class HitSampler
|
||||
{
|
||||
|
||||
public function HitSampler()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
private static function _hashString(param1:String) : Number
|
||||
{
|
||||
var _loc2_:crc32 = new crc32();
|
||||
var _loc3_:ByteArray = new ByteArray();
|
||||
_loc3_.writeUTFBytes(param1);
|
||||
_loc2_.update(_loc3_);
|
||||
return _loc2_.valueOf();
|
||||
}
|
||||
|
||||
private static function _parseNumber(param1:String) : Number
|
||||
{
|
||||
var _loc3_:* = 0;
|
||||
if(param1 == "")
|
||||
{
|
||||
return NaN;
|
||||
}
|
||||
var _loc4_:uint = uint(param1.length);
|
||||
var _loc2_:uint = 0;
|
||||
_loc3_ = 0;
|
||||
while(_loc3_ < _loc4_)
|
||||
{
|
||||
if(param1.charAt(_loc3_) == "." && _loc2_ == 0)
|
||||
{
|
||||
_loc2_++;
|
||||
}
|
||||
else if(!isDigit(param1,_loc3_))
|
||||
{
|
||||
return NaN;
|
||||
}
|
||||
_loc3_++;
|
||||
}
|
||||
return parseFloat(param1);
|
||||
}
|
||||
|
||||
public static function isSampled(param1:HitModel, param2:String = "") : Boolean
|
||||
{
|
||||
var _loc3_:Number = getSampleRate(param2);
|
||||
return _loc3_ < 100 && _hashString(param1.get("clientId")) % 10000 >= 100 * _loc3_;
|
||||
}
|
||||
|
||||
public static function getSampleRate(param1:String) : Number
|
||||
{
|
||||
if(param1 == null || param1 == "")
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
var _loc2_:Number = Math.max(0,Math.min(100,Math.round(_parseNumber(param1) * 100) / 100));
|
||||
if(isNaN(_loc2_))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return _loc2_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package libraries.uanalytics.tracking
|
||||
{
|
||||
public class HitSender implements AnalyticsSender
|
||||
{
|
||||
|
||||
public function HitSender()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
protected function _addParameter(param1:String, param2:String) : String
|
||||
{
|
||||
var _loc3_:String = "";
|
||||
_loc3_ += "&";
|
||||
_loc3_ += _appendEncoded(param1.substring(1));
|
||||
_loc3_ += "=";
|
||||
return _loc3_ + _appendEncoded(param2);
|
||||
}
|
||||
|
||||
protected function _appendEncoded(param1:String) : String
|
||||
{
|
||||
return encodeURIComponent(param1);
|
||||
}
|
||||
|
||||
protected function _buildHit(param1:HitModel) : String
|
||||
{
|
||||
var _loc4_:String = null;
|
||||
var _loc6_:String = null;
|
||||
var _loc5_:* = 0;
|
||||
var _loc2_:String = "";
|
||||
_loc2_ += "v=1";
|
||||
if(Configuration.SDKversion != "")
|
||||
{
|
||||
_loc2_ += _addParameter("&_v",Configuration.SDKversion);
|
||||
}
|
||||
var _loc3_:Vector.<String> = param1.getFieldNames();
|
||||
_loc3_.sort(1);
|
||||
_loc5_ = 0;
|
||||
while(_loc5_ < _loc3_.length)
|
||||
{
|
||||
_loc4_ = _loc3_[_loc5_];
|
||||
if(_loc4_.length > 0 && _loc4_.charAt(0) == "&")
|
||||
{
|
||||
_loc6_ = param1.get(_loc4_);
|
||||
if(_loc6_ != null)
|
||||
{
|
||||
_loc2_ += _addParameter(_loc4_,_loc6_);
|
||||
}
|
||||
}
|
||||
_loc5_++;
|
||||
}
|
||||
return _loc2_;
|
||||
}
|
||||
|
||||
public function send(param1:HitModel) : void
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
package libraries.uanalytics.tracking
|
||||
{
|
||||
import flash.utils.Dictionary;
|
||||
|
||||
public class Metadata
|
||||
{
|
||||
|
||||
public static const FIELD_PREFIX:String = "&";
|
||||
|
||||
private var _nameToParameterMap:Dictionary = new Dictionary();
|
||||
|
||||
private var _patternToParameterMap:Dictionary = new Dictionary();
|
||||
|
||||
public function Metadata()
|
||||
{
|
||||
super();
|
||||
addAlias("protocolVersion","v");
|
||||
addAlias("trackingId","tid");
|
||||
addAlias("anonymizeIp","aip");
|
||||
addAlias("dataSource","ds");
|
||||
addAlias("queueTime","qt");
|
||||
addAlias("cacheBuster","z");
|
||||
addAlias("clientId","cid");
|
||||
addAlias("userId","uid");
|
||||
addAlias("sessionControl","sc");
|
||||
addAlias("ipOverride","uip");
|
||||
addAlias("userAgentOverride","ua");
|
||||
addAlias("geographicalOverride","geoid");
|
||||
addAlias("documentReferrer","dr");
|
||||
addAlias("campaignName","cn");
|
||||
addAlias("campaignSource","cs");
|
||||
addAlias("campaignMedium","cm");
|
||||
addAlias("campaignKeyword","ck");
|
||||
addAlias("campaignContent","cc");
|
||||
addAlias("campaignId","ci");
|
||||
addAlias("googleAdwordsId","gclid");
|
||||
addAlias("googleDisplayAdsId","dclid");
|
||||
addAlias("screenResolution","sr");
|
||||
addAlias("viewportSize","vp");
|
||||
addAlias("documentEncoding","de");
|
||||
addAlias("screenColors","sd");
|
||||
addAlias("userLanguage","ul");
|
||||
addAlias("javaEnabled","je");
|
||||
addAlias("flashVersion","fl");
|
||||
addAlias("hitType","t");
|
||||
addAlias("nonInteraction","ni");
|
||||
addAlias("documentLocation","dl");
|
||||
addAlias("documentHostname","dh");
|
||||
addAlias("documentPath","dp");
|
||||
addAlias("documentTitle","dt");
|
||||
addAlias("screenName","cd");
|
||||
addAlias("linkId","linkid");
|
||||
addAlias("appName","an");
|
||||
addAlias("appId","aid");
|
||||
addAlias("appVersion","av");
|
||||
addAlias("appInstallerId","aiid");
|
||||
addAlias("eventCategory","ec");
|
||||
addAlias("eventAction","ea");
|
||||
addAlias("eventLabel","el");
|
||||
addAlias("eventValue","ev");
|
||||
addAlias("transactionId","ti");
|
||||
addAlias("transactionAffiliation","ta");
|
||||
addAlias("transactionRevenue","tr");
|
||||
addAlias("transactionShipping","ts");
|
||||
addAlias("transactionTax","tt");
|
||||
addAlias("itemName","in");
|
||||
addAlias("itemPrice","ip");
|
||||
addAlias("itemQuantity","iq");
|
||||
addAlias("itemCode","ic");
|
||||
addAlias("itemCategory","iv");
|
||||
addAlias("currencyCode","cu");
|
||||
addAlias("productAction","pa");
|
||||
addAlias("couponCode","tcc");
|
||||
addAlias("productActionList","pal");
|
||||
addAlias("checkoutStep","cos");
|
||||
addAlias("checkoutStepOption","col");
|
||||
addAlias("promotionAction","promoa");
|
||||
addAlias("socialNetwork","sn");
|
||||
addAlias("socialAction","sa");
|
||||
addAlias("socialTarget","st");
|
||||
addAlias("userTimingCategory","utc");
|
||||
addAlias("userTimingVar","utv");
|
||||
addAlias("userTimingTime","utt");
|
||||
addAlias("userTimingLabel","utl");
|
||||
addAlias("pageLoadTime","plt");
|
||||
addAlias("dnsTime","dns");
|
||||
addAlias("pageDownloadTime","pdt");
|
||||
addAlias("redirectResponseTime","rrt");
|
||||
addAlias("tcpConnectTime","tcp");
|
||||
addAlias("serverResponseTime","srt");
|
||||
addAlias("domInteractiveTime","dit");
|
||||
addAlias("contentLoadTime","clt");
|
||||
addAlias("exceptionDescription","exd");
|
||||
addAlias("exceptionFatal","exf");
|
||||
addPatternAlias("dimension([0-9]+)","cd");
|
||||
addPatternAlias("metric([0-9]+)","cm");
|
||||
}
|
||||
|
||||
private function _getKeyFromPattern(param1:String) : String
|
||||
{
|
||||
var _loc3_:RegExp = null;
|
||||
var _loc2_:Object = null;
|
||||
var _loc4_:String = null;
|
||||
for(var _loc5_:String in _patternToParameterMap)
|
||||
{
|
||||
_loc3_ = new RegExp(_loc5_);
|
||||
_loc2_ = _loc3_.exec(param1);
|
||||
if(_loc2_ && _loc2_[1])
|
||||
{
|
||||
_loc4_ = "&" + _patternToParameterMap[_loc5_] + _loc2_[1];
|
||||
addAlias(param1,_loc4_);
|
||||
return _loc4_;
|
||||
}
|
||||
}
|
||||
return param1;
|
||||
}
|
||||
|
||||
protected function addAlias(param1:String, param2:String) : void
|
||||
{
|
||||
_nameToParameterMap[param1] = "&" + param2;
|
||||
}
|
||||
|
||||
protected function addPatternAlias(param1:String, param2:String) : void
|
||||
{
|
||||
_patternToParameterMap[param1] = param2;
|
||||
}
|
||||
|
||||
public function getHitModelKey(param1:String) : String
|
||||
{
|
||||
if(param1.length > 0 && param1.charAt(0) == "&")
|
||||
{
|
||||
return param1;
|
||||
}
|
||||
var _loc2_:String = _nameToParameterMap[param1];
|
||||
if(_loc2_ == null)
|
||||
{
|
||||
_loc2_ = _getKeyFromPattern(param1);
|
||||
}
|
||||
return _loc2_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package libraries.uanalytics.tracking
|
||||
{
|
||||
public class RateLimitError extends Error
|
||||
{
|
||||
|
||||
public function RateLimitError(param1:String = "", param2:int = 0)
|
||||
{
|
||||
super(param1,param2);
|
||||
this.name = "RateLimitError";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package libraries.uanalytics.tracking
|
||||
{
|
||||
import flash.utils.getTimer;
|
||||
|
||||
public class RateLimiter
|
||||
{
|
||||
|
||||
private var _capacity:int;
|
||||
|
||||
private var _rate:int;
|
||||
|
||||
private var _span:Number;
|
||||
|
||||
private var _lastTime:int;
|
||||
|
||||
private var _tokenCount:int;
|
||||
|
||||
public function RateLimiter(param1:int, param2:int, param3:Number = 1)
|
||||
{
|
||||
super();
|
||||
_capacity = param1;
|
||||
_rate = param2;
|
||||
_span = param3;
|
||||
_tokenCount = param1;
|
||||
_lastTime = now();
|
||||
}
|
||||
|
||||
protected function now() : int
|
||||
{
|
||||
return getTimer();
|
||||
}
|
||||
|
||||
public function consumeToken() : Boolean
|
||||
{
|
||||
var _loc2_:int = getTimer();
|
||||
var _loc1_:int = Math.max(0,(_loc2_ - _lastTime) * (_rate * _span / 1000));
|
||||
_tokenCount = Math.min(_tokenCount + _loc1_,_capacity);
|
||||
if(_tokenCount > 0)
|
||||
{
|
||||
_tokenCount = _tokenCount - 1;
|
||||
_lastTime = _loc2_;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,313 @@
|
||||
package libraries.uanalytics.tracking
|
||||
{
|
||||
import flash.utils.Dictionary;
|
||||
|
||||
public class Tracker implements AnalyticsTracker
|
||||
{
|
||||
|
||||
public static const PROTOCOL_VERSION:String = "protocolVersion";
|
||||
|
||||
public static const TRACKING_ID:String = "trackingId";
|
||||
|
||||
public static const ANON_IP:String = "anonymizeIp";
|
||||
|
||||
public static const DATA_SOURCE:String = "dataSource";
|
||||
|
||||
public static const QUEUE_TIME:String = "queueTime";
|
||||
|
||||
public static const CACHE_BUSTER:String = "cacheBuster";
|
||||
|
||||
public static const CLIENT_ID:String = "clientId";
|
||||
|
||||
public static const USER_ID:String = "userId";
|
||||
|
||||
public static const SESSION_CONTROL:String = "sessionControl";
|
||||
|
||||
public static const IP_OVERRIDE:String = "ipOverride";
|
||||
|
||||
public static const USER_AGENT_OVERRIDE:String = "userAgentOverride";
|
||||
|
||||
public static const GEOGRAPHICAL_OVERRIDE:String = "geographicalOverride";
|
||||
|
||||
public static const DOCUMENT_REFERRER:String = "documentReferrer";
|
||||
|
||||
public static const CAMPAIGN_NAME:String = "campaignName";
|
||||
|
||||
public static const CAMPAIGN_SOURCE:String = "campaignSource";
|
||||
|
||||
public static const CAMPAIGN_MEDIUM:String = "campaignMedium";
|
||||
|
||||
public static const CAMPAIGN_KEYWORD:String = "campaignKeyword";
|
||||
|
||||
public static const CAMPAIGN_CONTENT:String = "campaignContent";
|
||||
|
||||
public static const CAMPAIGN_ID:String = "campaignId";
|
||||
|
||||
public static const GOOGLE_ADWORDS_ID:String = "googleAdwordsId";
|
||||
|
||||
public static const GOOGLE_DISPLAY_ADS_ID:String = "googleDisplayAdsId";
|
||||
|
||||
public static const SCREEN_RESOLUTION:String = "screenResolution";
|
||||
|
||||
public static const VIEWPORT_SIZE:String = "viewportSize";
|
||||
|
||||
public static const DOCUMENT_ENCODING:String = "documentEncoding";
|
||||
|
||||
public static const SCREEN_COLORS:String = "screenColors";
|
||||
|
||||
public static const USER_LANGUAGE:String = "userLanguage";
|
||||
|
||||
public static const JAVA_ENABLED:String = "javaEnabled";
|
||||
|
||||
public static const FLASH_VERSION:String = "flashVersion";
|
||||
|
||||
public static const HIT_TYPE:String = "hitType";
|
||||
|
||||
public static const NON_INTERACTION:String = "nonInteraction";
|
||||
|
||||
public static const DOCUMENT_LOCATION:String = "documentLocation";
|
||||
|
||||
public static const DOCUMENT_HOSTNAME:String = "documentHostname";
|
||||
|
||||
public static const DOCUMENT_PATH:String = "documentPath";
|
||||
|
||||
public static const DOCUMENT_TITLE:String = "documentTitle";
|
||||
|
||||
public static const SCREEN_NAME:String = "screenName";
|
||||
|
||||
public static const LINK_ID:String = "linkId";
|
||||
|
||||
public static const APP_NAME:String = "appName";
|
||||
|
||||
public static const APP_ID:String = "appId";
|
||||
|
||||
public static const APP_VERSION:String = "appVersion";
|
||||
|
||||
public static const APP_INSTALLER_ID:String = "appInstallerId";
|
||||
|
||||
public static const EVENT_CATEGORY:String = "eventCategory";
|
||||
|
||||
public static const EVENT_ACTION:String = "eventAction";
|
||||
|
||||
public static const EVENT_LABEL:String = "eventLabel";
|
||||
|
||||
public static const EVENT_VALUE:String = "eventValue";
|
||||
|
||||
public static const TRANSACTION_ID:String = "transactionId";
|
||||
|
||||
public static const TRANSACTION_AFFILIATION:String = "transactionAffiliation";
|
||||
|
||||
public static const TRANSACTION_REVENUE:String = "transactionRevenue";
|
||||
|
||||
public static const TRANSACTION_SHIPPING:String = "transactionShipping";
|
||||
|
||||
public static const TRANSACTION_TAX:String = "transactionTax";
|
||||
|
||||
public static const ITEM_NAME:String = "itemName";
|
||||
|
||||
public static const ITEM_PRICE:String = "itemPrice";
|
||||
|
||||
public static const ITEM_QUANTITY:String = "itemQuantity";
|
||||
|
||||
public static const ITEM_CODE:String = "itemCode";
|
||||
|
||||
public static const ITEM_CATEGORY:String = "itemCategory";
|
||||
|
||||
public static const CURRENCY_CODE:String = "currencyCode";
|
||||
|
||||
public static const PRODUCT_ACTION:String = "productAction";
|
||||
|
||||
public static const COUPON_CODE:String = "couponCode";
|
||||
|
||||
public static const PRODUCT_ACTION_LIST:String = "productActionList";
|
||||
|
||||
public static const CHECKOUT_STEP:String = "checkoutStep";
|
||||
|
||||
public static const CHECKOUT_STEP_OPTION:String = "checkoutStepOption";
|
||||
|
||||
public static const PROMOTION_ACTION:String = "promotionAction";
|
||||
|
||||
public static const SOCIAL_NETWORK:String = "socialNetwork";
|
||||
|
||||
public static const SOCIAL_ACTION:String = "socialAction";
|
||||
|
||||
public static const SOCIAL_TARGET:String = "socialTarget";
|
||||
|
||||
public static const USER_TIMING_CATEGORY:String = "userTimingCategory";
|
||||
|
||||
public static const USER_TIMING_VAR:String = "userTimingVar";
|
||||
|
||||
public static const USER_TIMING_TIME:String = "userTimingTime";
|
||||
|
||||
public static const USER_TIMING_LABEL:String = "userTimingLabel";
|
||||
|
||||
public static const PAGE_LOAD_TIME:String = "pageLoadTime";
|
||||
|
||||
public static const DNS_TIME:String = "dnsTime";
|
||||
|
||||
public static const PAGE_DOWNLOAD_TIME:String = "pageDownloadTime";
|
||||
|
||||
public static const REDIRECT_RESPONSE_TIME:String = "redirectResponseTime";
|
||||
|
||||
public static const TCP_CONNECT_TIME:String = "tcpConnectTime";
|
||||
|
||||
public static const SERVER_RESPONSE_TIME:String = "serverResponseTime";
|
||||
|
||||
public static const DOM_INTERACTIVE_TIME:String = "domInteractiveTime";
|
||||
|
||||
public static const CONTENT_LOAD_TIME:String = "contentLoadTime";
|
||||
|
||||
public static const EXCEPT_DESCRIPTION:String = "exceptionDescription";
|
||||
|
||||
public static const EXCEPT_FATAL:String = "exceptionFatal";
|
||||
|
||||
protected var _model:HitModel;
|
||||
|
||||
protected var _temporary:HitModel;
|
||||
|
||||
protected var _sender:HitSender;
|
||||
|
||||
protected var _limiter:RateLimiter;
|
||||
|
||||
protected var _config:Configuration;
|
||||
|
||||
public function Tracker()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function CUSTOM_DIMENSION(param1:uint = 0) : String
|
||||
{
|
||||
if(param1 < 1)
|
||||
{
|
||||
param1 = 1;
|
||||
}
|
||||
if(param1 > 200)
|
||||
{
|
||||
param1 = 200;
|
||||
}
|
||||
return "dimension" + param1;
|
||||
}
|
||||
|
||||
public static function CUSTOM_METRIC(param1:uint = 0) : String
|
||||
{
|
||||
if(param1 < 1)
|
||||
{
|
||||
param1 = 1;
|
||||
}
|
||||
if(param1 > 200)
|
||||
{
|
||||
param1 = 200;
|
||||
}
|
||||
return "metric" + param1;
|
||||
}
|
||||
|
||||
public function get trackingId() : String
|
||||
{
|
||||
return get("trackingId");
|
||||
}
|
||||
|
||||
public function get clientId() : String
|
||||
{
|
||||
return get("clientId");
|
||||
}
|
||||
|
||||
public function get config() : Configuration
|
||||
{
|
||||
return _config;
|
||||
}
|
||||
|
||||
public function set(param1:String, param2:String) : void
|
||||
{
|
||||
if(_model)
|
||||
{
|
||||
_model.set(param1,param2);
|
||||
}
|
||||
}
|
||||
|
||||
public function setOneTime(param1:String, param2:String) : void
|
||||
{
|
||||
if(_temporary)
|
||||
{
|
||||
_temporary.set(param1,param2);
|
||||
}
|
||||
}
|
||||
|
||||
public function get(param1:String) : String
|
||||
{
|
||||
if(_model)
|
||||
{
|
||||
return _model.get(param1);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function add(param1:Dictionary) : void
|
||||
{
|
||||
if(_model)
|
||||
{
|
||||
for(var _loc2_:String in param1)
|
||||
{
|
||||
set(_loc2_,param1[_loc2_]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function addOneTime(param1:Dictionary) : void
|
||||
{
|
||||
if(_temporary)
|
||||
{
|
||||
for(var _loc2_:String in param1)
|
||||
{
|
||||
setOneTime(_loc2_,param1[_loc2_]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function send(param1:String = null, param2:Dictionary = null) : Boolean
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function pageview(param1:String, param2:String = "") : Boolean
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function screenview(param1:String, param2:Dictionary = null) : Boolean
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function event(param1:String, param2:String, param3:String = "", param4:int = -1) : Boolean
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function transaction(param1:String, param2:String = "", param3:Number = 0, param4:Number = 0, param5:Number = 0, param6:String = "") : Boolean
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function item(param1:String, param2:String, param3:Number = 0, param4:int = 0, param5:String = "", param6:String = "", param7:String = "") : Boolean
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function social(param1:String, param2:String, param3:String) : Boolean
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function exception(param1:String = "", param2:Boolean = true) : Boolean
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function timing(param1:String, param2:String, param3:int, param4:String = "", param5:Dictionary = null) : Boolean
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user