Merge pull request #10 from dutchcoders/GA-UserVoice-opt-in
GA/UserVoice opt-in
This commit is contained in:
@@ -5,6 +5,8 @@ This repository contains the web frontend for [transfer.sh](github.com/dutchcode
|
|||||||
## Build
|
## Build
|
||||||
|
|
||||||
```
|
```
|
||||||
|
$ go get -u github.com/shuLhan/go-bindata/...
|
||||||
|
$ bower install
|
||||||
$ grunt build
|
$ grunt build
|
||||||
$ go generate .
|
$ go generate .
|
||||||
```
|
```
|
||||||
|
21239
bindata_gen.go
21239
bindata_gen.go
File diff suppressed because one or more lines are too long
@@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
<body id="download">
|
<body id="download">
|
||||||
<script>
|
<script>
|
||||||
|
var gaKey = "{{.GAKey}}";
|
||||||
|
if (gaKey != "") {
|
||||||
(function (i, s, o, g, r, a, m) {
|
(function (i, s, o, g, r, a, m) {
|
||||||
i['GoogleAnalyticsObject'] = r;
|
i['GoogleAnalyticsObject'] = r;
|
||||||
i[r] = i[r] || function () {
|
i[r] = i[r] || function () {
|
||||||
@@ -36,8 +38,9 @@
|
|||||||
a.src = g;
|
a.src = g;
|
||||||
m.parentNode.insertBefore(a, m)
|
m.parentNode.insertBefore(a, m)
|
||||||
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
||||||
ga('create', 'UA-40833733-1', 'transfer.sh');
|
ga('create', gaKey, 'transfer.sh');
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="navigation">
|
<div id="navigation">
|
||||||
@@ -88,12 +91,15 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
(function() {
|
(function() {
|
||||||
|
var userVoiceKey = "{{.UserVoiceKey}}";
|
||||||
|
if (userVoiceKey != "") {
|
||||||
var uv = document.createElement('script');
|
var uv = document.createElement('script');
|
||||||
uv.type = 'text/javascript';
|
uv.type = 'text/javascript';
|
||||||
uv.async = true;
|
uv.async = true;
|
||||||
uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
|
uv.src = '//widget.uservoice.com/{{.UserVoiceKey}}.js';
|
||||||
var s = document.getElementsByTagName('script')[0];
|
var s = document.getElementsByTagName('script')[0];
|
||||||
s.parentNode.insertBefore(uv, s)
|
s.parentNode.insertBefore(uv, s);
|
||||||
|
}
|
||||||
})()
|
})()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -102,6 +108,8 @@
|
|||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
var gaKey = "{{.GAKey}}";
|
||||||
|
if (gaKey != "") {
|
||||||
(function(b, o, i, l, e, r) {
|
(function(b, o, i, l, e, r) {
|
||||||
b.GoogleAnalyticsObject = l;
|
b.GoogleAnalyticsObject = l;
|
||||||
b[l] || (b[l] =
|
b[l] || (b[l] =
|
||||||
@@ -114,8 +122,9 @@
|
|||||||
e.src = '//www.google-analytics.com/analytics.js';
|
e.src = '//www.google-analytics.com/analytics.js';
|
||||||
r.parentNode.insertBefore(e, r)
|
r.parentNode.insertBefore(e, r)
|
||||||
}(window, document, 'script', 'ga'));
|
}(window, document, 'script', 'ga'));
|
||||||
ga('create', 'UA-40833733-1', 'transfer.sh');
|
ga('create', gaKey, 'transfer.sh');
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- build:js scripts/main.js -->
|
<!-- build:js scripts/main.js -->
|
||||||
|
@@ -20,12 +20,15 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
(function() {
|
(function() {
|
||||||
|
var userVoiceKey = "{{.UserVoiceKey}}";
|
||||||
|
if (userVoiceKey != "") {
|
||||||
var uv = document.createElement('script');
|
var uv = document.createElement('script');
|
||||||
uv.type = 'text/javascript';
|
uv.type = 'text/javascript';
|
||||||
uv.async = true;
|
uv.async = true;
|
||||||
uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
|
uv.src = '//widget.uservoice.com/{{.UserVoiceKey}}.js';
|
||||||
var s = document.getElementsByTagName('script')[0];
|
var s = document.getElementsByTagName('script')[0];
|
||||||
s.parentNode.insertBefore(uv, s)
|
s.parentNode.insertBefore(uv, s)
|
||||||
|
}
|
||||||
})()
|
})()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
|
var gaKey = "{{.GAKey}}";
|
||||||
|
if (gaKey != "") {
|
||||||
(function(i, s, o, g, r, a, m) {
|
(function(i, s, o, g, r, a, m) {
|
||||||
i['GoogleAnalyticsObject'] = r;
|
i['GoogleAnalyticsObject'] = r;
|
||||||
i[r] = i[r] || function() {
|
i[r] = i[r] || function() {
|
||||||
@@ -10,6 +12,7 @@
|
|||||||
a.src = g;
|
a.src = g;
|
||||||
m.parentNode.insertBefore(a, m)
|
m.parentNode.insertBefore(a, m)
|
||||||
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
||||||
ga('create', 'UA-40833733-1', 'transfer.sh');
|
ga('create', gaKey, 'transfer.sh');
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@@ -12,6 +12,8 @@ include "includes/head.html"
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
var gaKey = "{{.GAKey}}";
|
||||||
|
if (gaKey != "") {
|
||||||
(function (i, s, o, g, r, a, m) {
|
(function (i, s, o, g, r, a, m) {
|
||||||
i['GoogleAnalyticsObject'] = r;
|
i['GoogleAnalyticsObject'] = r;
|
||||||
i[r] = i[r] || function () {
|
i[r] = i[r] || function () {
|
||||||
@@ -23,8 +25,9 @@ include "includes/head.html"
|
|||||||
a.src = g;
|
a.src = g;
|
||||||
m.parentNode.insertBefore(a, m)
|
m.parentNode.insertBefore(a, m)
|
||||||
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
||||||
ga('create', 'UA-40833733-1', 'transfer.sh');
|
ga('create', gaKey, 'transfer.sh');
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
include "includes/navigation.html"
|
include "includes/navigation.html"
|
||||||
|
4309
src/styles/main.css
4309
src/styles/main.css
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user