changeset 2875:c704a743f269

Removed google analytics.
author Sergey Budnevitch <sb@waeme.net>
date Fri, 05 Aug 2022 12:19:48 +0400
parents 60851da88db6
children d8162f6cee38
files GNUmakefile xsls/article.xsls xsls/error.xsls xsls/ga.xsls xsls/news.xsls xslt/article.xslt xslt/error.xslt xslt/ga.xslt xslt/news.xslt
diffstat 9 files changed, 3 insertions(+), 71 deletions(-) [+]
line wrap: on
line diff
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -47,7 +47,6 @@ COMMON_DEPS =								\
 		xslt/body.xslt						\
 		xslt/menu.xslt						\
 		xslt/banner.xslt					\
-		xslt/ga.xslt						\
 		xslt/content.xslt					\
 
 ARTICLE_DEPS =								\
--- a/xsls/article.xsls
+++ b/xsls/article.xsls
@@ -27,7 +27,6 @@ X:include href = "style.xslt";
 X:include href = "body.xslt";
 X:include href = "menu.xslt";
 X:include href = "banner.xslt";
-X:include href = "ga.xslt";
 X:include href = "content.xslt";
 X:include href = "books.xslt";
 X:include href = "directive.xslt";
@@ -52,8 +51,6 @@ X:template = "/article | /module" {
 
     !banner ()
 
-    !ga ()
-
     </head>
 
     !body (lang="@lang")
--- a/xsls/error.xsls
+++ b/xsls/error.xsls
@@ -26,7 +26,6 @@ X:include href = "link.xslt";
 X:include href = "style.xslt";
 X:include href = "body.xslt";
 X:include href = "menu.xslt";
-X:include href = "ga.xslt";
 X:include href = "content.xslt";
 
 
@@ -35,8 +34,6 @@ X:template = "/error" {
 
     !style (lang="@lang")
 
-    !ga ()
-
     </head>
 
     !body (lang="@lang")
deleted file mode 100644
--- a/xsls/ga.xsls
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-  Copyright (C) Nginx, Inc.
-  -->
-
-X:stylesheet {
-
-X:template ga () {
-
-    <script>
-        (function(w, d, s, l, i) \{
-            w[l] = w[l] || [];
-            w[l].push(\{
-                'gtm.start': new Date().getTime(),
-                event: 'gtm.js'
-            \});
-            var f = d.getElementsByTagName(s)[0],
-                j = d.createElement(s),
-                dl = l != 'dataLayer' ? '&amp;l=' + l : '';
-            j.async = true;
-            j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl;
-            f.parentNode.insertBefore(j, f);
-        \})(window, document, 'script', 'dataLayer', 'GTM-TPSP33');
-    </script>
-
-}
-
-}
--- a/xsls/news.xsls
+++ b/xsls/news.xsls
@@ -28,7 +28,6 @@ X:include href = "style.xslt";
 X:include href = "body.xslt";
 X:include href = "menu.xslt";
 X:include href = "banner.xslt";
-X:include href = "ga.xslt";
 X:include href = "content.xslt";
 
 
@@ -44,8 +43,6 @@ X:template = "/news" {
 
     !banner ()
 
-    !ga ()
-
     </head>
 
     !body (lang="@lang")
--- a/xslt/article.xslt
+++ b/xslt/article.xslt
@@ -28,7 +28,6 @@
 <xsl:include href="body.xslt"/>
 <xsl:include href="menu.xslt"/>
 <xsl:include href="banner.xslt"/>
-<xsl:include href="ga.xslt"/>
 <xsl:include href="content.xslt"/>
 <xsl:include href="books.xslt"/>
 <xsl:include href="directive.xslt"/>
@@ -49,7 +48,7 @@
 
     <title> <xsl:value-of select="@name"/> </title>
 
-    <xsl:call-template name="style"><xsl:with-param select="@lang" name="lang"/></xsl:call-template><xsl:call-template name="banner"/><xsl:call-template name="ga"/></head>
+    <xsl:call-template name="style"><xsl:with-param select="@lang" name="lang"/></xsl:call-template><xsl:call-template name="banner"/></head>
 
     <xsl:call-template name="body"><xsl:with-param select="@lang" name="lang"/></xsl:call-template></html>
 </xsl:template>
--- a/xslt/error.xslt
+++ b/xslt/error.xslt
@@ -27,14 +27,13 @@
 <xsl:include href="style.xslt"/>
 <xsl:include href="body.xslt"/>
 <xsl:include href="menu.xslt"/>
-<xsl:include href="ga.xslt"/>
 <xsl:include href="content.xslt"/>
 
 
 <xsl:template match="/error">
     <html><head><title> <xsl:value-of select="@name"/> </title>
 
-    <xsl:call-template name="style"><xsl:with-param select="@lang" name="lang"/></xsl:call-template><xsl:call-template name="ga"/></head>
+    <xsl:call-template name="style"><xsl:with-param select="@lang" name="lang"/></xsl:call-template></head>
 
     <xsl:call-template name="body"><xsl:with-param select="@lang" name="lang"/></xsl:call-template></html>
 </xsl:template>
deleted file mode 100644
--- a/xslt/ga.xslt
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) Nginx, Inc.
-  -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<xsl:template name="ga">
-
-    <script>
-        (function(w, d, s, l, i) {
-            w[l] = w[l] || [];
-            w[l].push({
-                'gtm.start': new Date().getTime(),
-                event: 'gtm.js'
-            });
-            var f = d.getElementsByTagName(s)[0],
-                j = d.createElement(s),
-                dl = l != 'dataLayer' ? '&amp;l=' + l : '';
-            j.async = true;
-            j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl;
-            f.parentNode.insertBefore(j, f);
-        })(window, document, 'script', 'dataLayer', 'GTM-TPSP33');
-    </script>
-
-</xsl:template>
-
-</xsl:stylesheet>
--- a/xslt/news.xslt
+++ b/xslt/news.xslt
@@ -29,7 +29,6 @@
 <xsl:include href="body.xslt"/>
 <xsl:include href="menu.xslt"/>
 <xsl:include href="banner.xslt"/>
-<xsl:include href="ga.xslt"/>
 <xsl:include href="content.xslt"/>
 
 
@@ -40,7 +39,7 @@
 
     <title> <xsl:value-of select="@name"/> <xsl:if test="$YEAR"> <xsl:text>: </xsl:text> <xsl:value-of select="$YEAR"/> </xsl:if> </title>
 
-    <xsl:call-template name="style"><xsl:with-param select="@lang" name="lang"/></xsl:call-template><xsl:call-template name="banner"/><xsl:call-template name="ga"/></head>
+    <xsl:call-template name="style"><xsl:with-param select="@lang" name="lang"/></xsl:call-template><xsl:call-template name="banner"/></head>
 
     <xsl:call-template name="body"><xsl:with-param select="@lang" name="lang"/></xsl:call-template></html>
 </xsl:template>