You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2019/06/18 21:07:00 UTC
[maven-doxia-sitetools] 01/02: [DOXIASITETOOLS-209] Align Google
Analytics snippet with Fluido Skin
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git
commit ae4e9dc21a9015316da622b0e36ed6226afb8832
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Tue Jun 18 22:50:55 2019 +0200
[DOXIASITETOOLS-209] Align Google Analytics snippet with Fluido Skin
---
.../siterenderer/resources/default-site-macros.vm | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site-macros.vm b/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site-macros.vm
index 056384e..911047f 100644
--- a/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site-macros.vm
+++ b/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site-macros.vm
@@ -475,18 +475,15 @@ $indent </ul>##
#macro ( googleAnalytics $accountId )
#**##if( $accountId && $accountId != "" )
<!-- Google Analytics -->
- <script type="text/javascript">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', '$accountId']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
+ <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', '$accountId', 'auto');
+ ga('send', 'pageview');
+ ga('set', 'anonymizeIp', true);
+ ga('set', 'forceSSL', true);
</script>
#**##end
#end