Browse Source

feat: Baidu Tongji analytics module (#1087)

* Support Baidu Tongji analytics module

* fix: baidutongji logo + props
pull/1098/head
Lawrence Ching 5 years ago
committed by Nicolas Giard
parent
commit
922b7bd1bd
2 changed files with 24 additions and 0 deletions
  1. 11
      server/modules/analytics/baidutongji/code.yml
  2. 13
      server/modules/analytics/baidutongji/definition.yml

11
server/modules/analytics/baidutongji/code.yml

@ -0,0 +1,11 @@
head: |
<!-- Baidu Tongji -->
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?{{propertyTrackingId}}";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>

13
server/modules/analytics/baidutongji/definition.yml

@ -0,0 +1,13 @@
key: baidutongji
title: Baidu Tongji
description: Baidu Tongji is a web analytics service offered by Baidu that tracks and reports website traffic.
author: lawrenceching
logo: https://static.requarks.io/logo/baidu.svg
website: https://tongji.baidu.com
isAvailable: true
props:
propertyTrackingId:
type: String
title: Property Tracking ID
hint: Unique Property ID (found at the end of the tracking URL, e.g. https://hm.baidu.com/hm.js?XXXXXXXXXXXX)
order: 1
Loading…
Cancel
Save