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 .
|
||||||
```
|
```
|
||||||
|
21247
bindata_gen.go
21247
bindata_gen.go
File diff suppressed because one or more lines are too long
@@ -25,19 +25,22 @@
|
|||||||
|
|
||||||
<body id="download">
|
<body id="download">
|
||||||
<script>
|
<script>
|
||||||
(function(i, s, o, g, r, a, m) {
|
var gaKey = "{{.GAKey}}";
|
||||||
i['GoogleAnalyticsObject'] = r;
|
if (gaKey != "") {
|
||||||
i[r] = i[r] || function() {
|
(function (i, s, o, g, r, a, m) {
|
||||||
|
i['GoogleAnalyticsObject'] = r;
|
||||||
|
i[r] = i[r] || function () {
|
||||||
(i[r].q = i[r].q || []).push(arguments)
|
(i[r].q = i[r].q || []).push(arguments)
|
||||||
}, i[r].l = 1 * new Date();
|
}, i[r].l = 1 * new Date();
|
||||||
a = s.createElement(o),
|
a = s.createElement(o),
|
||||||
m = s.getElementsByTagName(o)[0];
|
m = s.getElementsByTagName(o)[0];
|
||||||
a.async = 1;
|
a.async = 1;
|
||||||
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,20 +108,23 @@
|
|||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
(function(b, o, i, l, e, r) {
|
var gaKey = "{{.GAKey}}";
|
||||||
b.GoogleAnalyticsObject = l;
|
if (gaKey != "") {
|
||||||
b[l] || (b[l] =
|
(function(b, o, i, l, e, r) {
|
||||||
|
b.GoogleAnalyticsObject = l;
|
||||||
|
b[l] || (b[l] =
|
||||||
function() {
|
function() {
|
||||||
(b[l].q = b[l].q || []).push(arguments)
|
(b[l].q = b[l].q || []).push(arguments)
|
||||||
});
|
});
|
||||||
b[l].l = +new Date;
|
b[l].l = +new Date;
|
||||||
e = o.createElement(i);
|
e = o.createElement(i);
|
||||||
r = o.getElementsByTagName(i)[0];
|
r = o.getElementsByTagName(i)[0];
|
||||||
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,15 +1,18 @@
|
|||||||
<script>
|
<script>
|
||||||
(function(i, s, o, g, r, a, m) {
|
var gaKey = "{{.GAKey}}";
|
||||||
i['GoogleAnalyticsObject'] = r;
|
if (gaKey != "") {
|
||||||
i[r] = i[r] || function() {
|
(function(i, s, o, g, r, a, m) {
|
||||||
|
i['GoogleAnalyticsObject'] = r;
|
||||||
|
i[r] = i[r] || function() {
|
||||||
(i[r].q = i[r].q || []).push(arguments)
|
(i[r].q = i[r].q || []).push(arguments)
|
||||||
}, i[r].l = 1 * new Date();
|
}, i[r].l = 1 * new Date();
|
||||||
a = s.createElement(o),
|
a = s.createElement(o),
|
||||||
m = s.getElementsByTagName(o)[0];
|
m = s.getElementsByTagName(o)[0];
|
||||||
a.async = 1;
|
a.async = 1;
|
||||||
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,19 +12,22 @@ 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 () {
|
||||||
(i[r].q = i[r].q || []).push(arguments)
|
(i[r].q = i[r].q || []).push(arguments)
|
||||||
}, i[r].l = 1 * new Date();
|
}, i[r].l = 1 * new Date();
|
||||||
a = s.createElement(o),
|
a = s.createElement(o),
|
||||||
m = s.getElementsByTagName(o)[0];
|
m = s.getElementsByTagName(o)[0];
|
||||||
a.async = 1;
|
a.async = 1;
|
||||||
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