hexo-theme-ayer/layout/_partial/baidu-analytics.ejs

12 lines
306 B
JavaScript
Raw Normal View History

2019-12-06 12:21:24 +00:00
<% if (theme.baidu_analytics){ %>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?<%= theme.baidu_analytics %>";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<% } %>