Commit b49d6499 by 杨北旺

添加埋点开关配置

1 parent 5cc31762
......@@ -7,7 +7,8 @@ const defaultData = {
server_url: 'http://tracking-backend.test.glsx.com/track',
send_timeout: 6000,
max_length: 10,
show_log: true
show_log: true,
switch:true
}
const commonData = {}
function init({ settings, common,getTitle }) {
......@@ -372,6 +373,9 @@ tracker.trackEvent = trackEvent
tracker.sendStrategy = sendStrategy
// eventType 事件类型 properties 业务对象 callback 回调
tracker.track = function (properties, eventType = 'click', callback) {
if(!defaultData.switch){
return
}
this.trackEvent.send(
{
type: 'track',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!