第三方统计 统计方法实现

shishi1234 shishi1234 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
想做一个统计系统:
大概了解了一下百度统计方法,应该是用new image 做的。

我现在采用的方案也是用new image 的方法进行的

var im = "i_" + Math.floor(2147483648 * Math.random()).toString(36);
window[im] = new Image();
window[im].onload = window[im].onerror = window[im].onabort = function(){clear(this);};
window[im].src = url;
function clear(obj){
obj.onerror = null;
obj.onload = null;
obj.onabort = null;
obj = null;
}


出现的问题:发现有请求丢失 现像。求有经验的大侠指点。


...全文

相关推荐

评论
收藏 已收藏
分享
返回顶部
shishi1234
JavaScript 87,984 成员 224,681 内容