Add chartbeat.com analytics
This commit is contained in:
@@ -176,6 +176,9 @@ Optional site parameters:
|
|||||||
```yaml
|
```yaml
|
||||||
paige:
|
paige:
|
||||||
analytics:
|
analytics:
|
||||||
|
chartbeat: # chartbeat.com
|
||||||
|
account_id: "123456"
|
||||||
|
domain: "example.com"
|
||||||
clicky: # clicky.com
|
clicky: # clicky.com
|
||||||
account_id: "123456"
|
account_id: "123456"
|
||||||
fathom: # usefathom.com
|
fathom: # usefathom.com
|
||||||
|
@@ -10,6 +10,26 @@
|
|||||||
{{ if .Site.GoogleAnalytics }}
|
{{ if .Site.GoogleAnalytics }}
|
||||||
{{ template "_internal/google_analytics.html" . }}
|
{{ template "_internal/google_analytics.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ with .Site.Params.paige.analytics.chartbeat }}
|
||||||
|
<script type='text/javascript'>
|
||||||
|
(function() {
|
||||||
|
var _sf_async_config = window._sf_async_config = (window._sf_async_config || {});
|
||||||
|
_sf_async_config.uid = {{ .account_id }};
|
||||||
|
_sf_async_config.domain = {{ .domain }};
|
||||||
|
_sf_async_config.useCanonical = true;
|
||||||
|
_sf_async_config.useCanonicalDomain = true;
|
||||||
|
function loadChartbeat() {
|
||||||
|
var e = document.createElement('script');
|
||||||
|
var n = document.getElementsByTagName('script')[0];
|
||||||
|
e.type = 'text/javascript';
|
||||||
|
e.async = true;
|
||||||
|
e.src = 'https://static.chartbeat.com/js/chartbeat.js';
|
||||||
|
n.parentNode.insertBefore(e, n);
|
||||||
|
}
|
||||||
|
loadChartbeat();
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
||||||
{{ with .Site.Params.paige.analytics.clicky }}
|
{{ with .Site.Params.paige.analytics.clicky }}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var clicky_site_ids = clicky_site_ids || [];
|
var clicky_site_ids = clicky_site_ids || [];
|
||||||
|
Reference in New Issue
Block a user