// BA全局变量 var baAccount = window.AME_BA_ID || 'fe557d1f75199e'; var baevent = function(){}; (function(){ var sampleRate = 100; // 采样比例,即上报量占总流量的百分比 !function (t, e, a, n, s, c){t.ToutiaoAnalyticsObject = s, t[s] = t[s] || function (){ (t[s].q = t[s].q || []).push(arguments)}, t[s].t = 1 * new Date, t[s].s = c;var i = e.createElement(a); i.async = 1, i.src = n, e.getElementsByTagName("head")[0].appendChild(i) }(window, document, "script", "//s3.bytecdn.cn/ta/resource/v0/analytics.js", "ba"); ba('create', baAccount, {'sampleRate': sampleRate}); ba('send', 'pageview'); baevent = function(category, action, label, value){ console.log("ba:"+category+","+action+","+label); if(category != 'event') { ba('send', 'event', category, action, label, typeof value !== 'undefined' ? value: 1); } }; })();