diff options
author | Vitaly Takmazov | 2017-05-22 22:09:54 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-05-22 22:09:54 +0300 |
commit | 76a70dc91e4b277d9946d0e6563db8964275adac (patch) | |
tree | fd439a97f1bef889ddf97f65915a32ab5031f07e | |
parent | c8197edc0019d92508ff65c8507e5696644f237b (diff) |
juick-www: Google Analytics is served by Cloudflare now
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/PageTemplates.java | 13 | ||||
-rw-r--r-- | juick-www/src/main/webapp/WEB-INF/views/partial/footer.html | 23 |
2 files changed, 10 insertions, 26 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/PageTemplates.java b/juick-www/src/main/java/com/juick/www/controllers/PageTemplates.java index 261efff3..9c6251b0 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/PageTemplates.java +++ b/juick-www/src/main/java/com/juick/www/controllers/PageTemplates.java @@ -179,24 +179,15 @@ public class PageTemplates { out.println("</div>"); out.println("</div>"); - out.println("<script>"); - out.println("(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){"); - out.println("(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),"); - out.println("m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)"); - out.println("})(window,document,'script','//www.google-analytics.com/analytics.js','ga');"); - out.println("ga('create','UA-385578-4','juick.com');"); - out.println("ga('require','displayfeatures');"); - out.println("ga('send','pageview');"); - if (sapeon) { + out.println("<script>"); out.println("var _acic={dataProvider:10};"); out.println("(function(){"); out.println("var e=document.createElement('script');e.type='text/javascript';e.async=true;e.src='//www2.aci'+'nt.net/aci.js';"); out.println("var t=document.getElementsByTagName('script')[0];t.parentNode.insertBefore(e,t);"); out.println("})();"); + out.println("</script>"); } - - out.println("</script>"); } public void pageEnd(PrintWriter out) { diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/footer.html b/juick-www/src/main/webapp/WEB-INF/views/partial/footer.html index c9ccb26d..0fcd16de 100644 --- a/juick-www/src/main/webapp/WEB-INF/views/partial/footer.html +++ b/juick-www/src/main/webapp/WEB-INF/views/partial/footer.html @@ -16,19 +16,12 @@ {% endif %} </div> </div> +{% if (showAdv | default(false)) %} <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-385578-4','juick.com'); - ga('require','displayfeatures'); - ga('send','pageview'); - {% if (showAdv | default(false)) %} - var _acic={dataProvider:10}; - (function(){ - var e=document.createElement('script');e.type='text/javascript';e.async=true;e.src='//www2.aci'+'nt.net/aci.js'; - var t=document.getElementsByTagName('script')[0];t.parentNode.insertBefore(e,t); - })(); - {% endif %} -</script>
\ No newline at end of file + var _acic={dataProvider:10}; + (function(){ + var e=document.createElement('script');e.type='text/javascript';e.async=true;e.src='//www2.aci'+'nt.net/aci.js'; + var t=document.getElementsByTagName('script')[0];t.parentNode.insertBefore(e,t); + })(); +</script> +{% endif %}
\ No newline at end of file |