Permalink
Browse files

Add exponea support.

  • Loading branch information...
Juraj Bubniak
Juraj Bubniak committed Aug 30, 2018
1 parent 2340a01 commit 369507039ce5140542b5cba8c1e0f4a3ea270b11
Showing with 21 additions and 0 deletions.
  1. +4 −0 README.md
  2. +4 −0 exampleSite/config.toml
  3. +12 −0 layouts/partials/exponea.html
  4. +1 −0 layouts/partials/header.html
View
@@ -82,6 +82,10 @@ disqusShortname = "XXX"
dateFormat = "Mon, Jan 2, 2006"
highlightJsUrl = ""
highlightJsLocalUrl = ""
exponeaJsUrl = ""
exponeaTarget = ""
exponeaToken = ""
exponeaTrackVisits = false
[Permalinks]
post = "/:year/:month/:day/:filename/"
View
@@ -42,6 +42,10 @@ googleAnalytics = "XXX"
dateFormat = "Mon, Jan 2, 2006"
highlightJsUrl = ""
highlightJsLocalUrl = ""
exponeaJsUrl = ""
exponeaTarget = ""
exponeaToken = ""
exponeaTrackVisits = false
[Permalinks]
post = "/:year/:month/:day/:filename/"
@@ -0,0 +1,12 @@
{{ if .Site.Params.exponeaJsUrl }}
<script>(function(d,b){if(!d.exponea){var a=function(a,g){function k(c){return function(){var e=arguments;""==a&&"initialize"==c&&e&&e[0].modify&&e[0].modify.overlay&&"loading"==b.readyState&&(b.write('<div id="__inf__overlay__" style="position:absolute;background:#fff;left:0;top:0;width:100%;height:100%;z-index:1000000"></div>'),setTimeout(function(){var a=b.getElementById("__inf__overlay__");a&&b.body.removeChild(a);res.__=!0},e[0].modify.delay||500));d.exponea._.push([a+c,arguments])}}var h=g.split(" "),f,c;res={_:[]};for(c=0;c<h.length;c++)f=h[c],res[f]=k(f);return res};d.exponea=a("","initialize identify update track trackLink trackEnhancedEcommerce getHtml showHtml showBanner showForm ping getAbTest");d.exponea.notifications=a("notifications.","isAvailable isSubscribed subscribe unsubscribe");var a=b.createElement("script"),g="https:"===b.location.protocol?"https:":"http:";a.type="text/javascript";a.async=!0;a.src=g+"{{ .Site.Params.exponeaJsUrl }}";b.getElementsByTagName("head")[0].appendChild(a)}})(window,document);</script>
<script type="text/javascript">
exponea.initialize({
"target": "{{ .Site.Params.exponeaTarget }}",
"token": "{{ .Site.Params.exponeaToken }}",
"track": {
"visits": {{ if .Site.Params.exponeaTrackVisits }}true{{ else }}false{{ end }}
}
});
</script>
{{ end }}
@@ -18,6 +18,7 @@
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml">
{{ end }}
{{ partial "extra-in-head.html" . }}
{{ partial "exponea.html" . }}
</head>
<body>
{{ template "_internal/google_analytics.html" . }}

0 comments on commit 3695070

Please sign in to comment.