Permalink
Browse files

独自ドメイン用googleanalytics設定に変更

  • Loading branch information...
ksmzn committed Jun 8, 2015
1 parent da4f941 commit d172090530bfad153149ee52adde12f416bc8f93
Showing with 21 additions and 6 deletions.
  1. +1 −0 {shinyapps → rsconnect/shinyapps.io}/ksmzn/statdist.dcf
  2. +20 −6 www/js/google-analytics.js
@@ -2,3 +2,4 @@ name: statdist
account: ksmzn
bundleId: 161364
url: http://ksmzn.shinyapps.io/statdist
server: shinyapps.io
View
@@ -1,7 +1,21 @@
(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');
try{
(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');
(function(){
var uaid = "";
var domain = "statdist.ksmzn.com";
ga('create', 'UA-12393166-8', 'auto');
ga('send', 'pageview');
if (location.host == domain){
uaid = 'UA-12393166-9';
}else{
uaid = 'UA-12393166-8';
}
ga('create', uaid, 'auto');
ga('send', 'pageview');
})();
}catch(e){
console.error(e);
}

0 comments on commit d172090

Please sign in to comment.