Only output GA on plyr.io domain
This commit is contained in:
parent
18dfc17439
commit
044bcb359e
2
dist/js/docs.js
vendored
2
dist/js/docs.js
vendored
File diff suppressed because one or more lines are too long
10
index.html
10
index.html
@ -70,15 +70,5 @@
|
||||
|
||||
<!-- Docs setup -->
|
||||
<script src="dist/js/docs.js"></script>
|
||||
|
||||
<!-- GA -->
|
||||
<script>
|
||||
(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].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
ga('create', 'UA-40881672-11', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -12,4 +12,15 @@ plyr.setup({
|
||||
captions: {
|
||||
defaultActive: true
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Google analytics
|
||||
// For demo site (http://plyr.io) only
|
||||
if(document.domain === "plyr.io") {
|
||||
(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].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,"script","//www.google-analytics.com/analytics.js","ga");
|
||||
ga("create", "UA-40881672-11", "auto");
|
||||
ga("send", "pageview");
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user