Git Product home page Git Product logo

collect's Introduction

collect

JavaScript采集器

功能模块划分 说明
外部资源加载 如,弹出式热图、事件、badge等
内部、外部API 如,setTrackEvent等
内部基础逻辑 如,报文发送(每个包单独拆离)
关键指标、字段说明 如,静默时间定义、心跳时间定义等
工具情况 如,cookie、url等处理
优雅降级shim、polyfill 如,querySelector、addEventListener等函数
特殊对应处理 如,部分站点抽样

注意问题

  • 错误的处理
  • 兼容性处理
  • 特殊对应处理
  • 用户布玛使用iframe方式,位置坐标的兼容处理!

不支持的情况

  • Access-Control-Allow-Origin限制(代理实现)
  • Content-Security-Policy有特殊指定
  • Strict-Transport-Security特殊要求

其他

var ary = ['a', 'b', 'c'];
for(var i = 0, len = ary.length; i < len; i++) {
    if(ua.indexOf(ary[i]) > -1) return true;
    return false;
}
// 替换写法
return /(a|b|c)/i.test(ua);

collect's People

Contributors

381510688 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.