一:友盟
(1)注册友盟账号,添加站点,填写域名,填写进入链接
(2)在统计代码中复制埋点代码到js文件或者html首页,例如下:
<script type="text/javascript">
var cnzz_protocol = (("https:" == document.location.protocol) ? "https://" : "http://");
document.write(unescape("%3Cspan id='cnzz_stat_icon_1277774388'%3E%3C/span%3E%3Cscript src='"
+ cnzz_protocol
+ "s5.cnzz.com/z_stat.php%3Fid%3D1277774388' type='text/javascript'%3E%3C/script%3E"));
document.getElementById("cnzz_stat_icon_1277774388").style.display="none";
</script>
(3)添加点击事件处理:
_czc.push(["_trackEvent","全麦白啤听装--立即购买","点击"]);
二:百度
(1)注册百度账号
https://tongji.baidu.com/web/10000130074/visit/toppage?siteId=14314582
(2)添加埋点,获取埋点代码,如下:
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?e52f8c7b1c0ba43643ebd29521f3347d";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
(3)添加点击事件:
_hmt.push(["_trackEvent","全麦白啤听装--立即购买","点击"]);