js追踪脚本

  js追踪脚本   lk_t.js         var路={
,,版本:“1.0”,
,,主持人:“”,
,,关键:“路”,
,, expire_days: 3600,
,, cmds: [],
,,跟踪:函数()
,, {
,,,, var=this.tracker;
,,,,。时间戳=this.getTimestamp ();
,,,,。支持={};
,,,,//发送请求
,,,,。日志=函数(参数){
,,,,,, var img=新形象(1,1);
,,,,, img。onLoad=function () {};
,,,,, img。LK.buildUrl(参数);
,,,,};},
,
,,//处理命令队列
,,提交:函数()
,, {
,,,, this.tracker ();
,,,,,我在this.cmds (var)
,,,, {
,,,,,,行=this.cmds[我];   ,,,,,//调用和应用,它们的作用都是将函数绑定到另外一个对象上去运行
,,,,,//Array.prototype。片这句就是访问数组的内置方法
,,,,,, var args=Array.prototype.slice。调用(线,1);
,,,,,,如果窗口(! [this.key])
,,,,,,,,(这个窗口。关键]=;
,,,,,,窗口[this.key][行[0]]苹果(这一点。追踪,args);
,,,,}
,,},
,, setSiteId:函数(siteid)
,, {
,,,,。siteid=siteid;},
,
,,//跟踪PV
,, trackPageView:函数()
,, {
,,,, this.log (");},
,
,,//订单数据
,, addTransaction:函数(order_id、order_source、总、税收、航运、网关、城市、州、国家)
,, {
,,,,如果(! this.prop.trans)
,,,,,, this.prop。反式={};
,,,,
,,,, var trans={};
,,,反式。order_id=order_id;
,,,反式。order_source=encodeURIComponent (order_source);
,,,反式。总=总;
,,,反式。税=税;
,,,反式。航运=;
,,,反式。网关=encodeURIComponent(网关);
,,,反式。城市=encodeURIComponent(城市);
,,,反式。状态=encodeURIComponent(状态);
,,,反式。国家=encodeURIComponent(国家);
,,,反式。项=[];
,,, this.prop。反式[order_id]=反式;,,,,
,,},
,,//产品数据
,, addTransactionLineItem:函数(sku, order_id product_name,类别,unit_price,数量)
,, {
,,,,李var={};
,,,李。li_order_id=order_id;
,,,李。li_sku=encodeURIComponent (sku);
,,,李。li_product_name=encodeURIComponent (product_name);
,,,李。li_category=encodeURIComponent(类别);
,,,李。li_unit_price=encodeURIComponent (unit_price);
,,,李。li_quantity=数量;
,,,, var=this.prop.trans顺序(order_id);
,,,, var项=订单(“项目”);
,,,, items.push(李);
,,,,订单(“项目”)=物品;
,,, this.prop。反式[order_id]=订单;},
,
,, trackTransaction:函数()
,, {
,,,, var参数=" ";
,,,,, (var o this.prop.trans)
,,,, {
,,,,,,, (var k this.prop.trans [o])
,,,,,, {
,,,,,,,, var v=this.prop.trans [o] [k];
,,,,,,,,如果(typeof v==='对象')
,,,,,,,,,,, (var t v)
,,,,,,,,,,,,为v (t) (ta)
,,,,,,,,,,,,,, param +=?“+助教+ "=" + v (t) (ta);
,,,,,,,,其他
,,,,,,,,,, param +=?“+ v + k +“=?
,,,,,,}
,,,,}
,,,, this.log(参数);null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null

js追踪脚本