Blame SOURCES/0001-Remove-all-Google-Analytics-tracking.patch

e0f0a4
From 21b6f4101a5c04cd8e2e959f4bfb8932af6267b6 Mon Sep 17 00:00:00 2001
e0f0a4
From: Alfredo Moralejo <amoralej@redhat.com>
e0f0a4
Date: Mon, 1 Jun 2020 15:13:26 +0200
e0f0a4
Subject: [PATCH] Remove all Google Analytics tracking
e0f0a4
e0f0a4
Even if https://github.com/openstack/openstackdocstheme/commit/89b0475539ac6763baa27f5fc334639ee3853ebf
e0f0a4
made Google Analytics optional, it was still present in
e0f0a4
script_search.html
e0f0a4
---
e0f0a4
 .../theme/openstackdocs/script_search.html    | 26 -------------------
e0f0a4
 .../theme/openstackdocs/theme.conf            |  2 +-
e0f0a4
 2 files changed, 1 insertion(+), 27 deletions(-)
e0f0a4
e0f0a4
diff --git a/openstackdocstheme/theme/openstackdocs/script_search.html b/openstackdocstheme/theme/openstackdocs/script_search.html
e0f0a4
index 8a62dc6..1141d82 100644
e0f0a4
--- a/openstackdocstheme/theme/openstackdocs/script_search.html
e0f0a4
+++ b/openstackdocstheme/theme/openstackdocs/script_search.html
e0f0a4
@@ -1,28 +1,2 @@
e0f0a4
-<script src="https://www.google.com/jsapi" type="text/javascript"></script>
e0f0a4
 <script type="text/javascript">
e0f0a4
- //
e0f0a4
-google.load('search', '1', {
e0f0a4
-    language: 'en'
e0f0a4
-});
e0f0a4
-var _gaq = _gaq ||[];
e0f0a4
-_gaq.push([ "_setAccount", "UA-17511903-1"]);
e0f0a4
-function _trackQuery(control, searcher, query) {
e0f0a4
-    var gaQueryParamName = "q";
e0f0a4
-    var loc = document.location;
e0f0a4
-    var url =[
e0f0a4
-    loc.pathname,
e0f0a4
-    loc.search,
e0f0a4
-    loc.search ? '&': '?',
e0f0a4
-    gaQueryParamName == '' ? 'q': encodeURIComponent(gaQueryParamName),
e0f0a4
-    '=',
e0f0a4
-    encodeURIComponent(query)].join('');
e0f0a4
-    _gaq.push([ "_trackPageview", url]);
e0f0a4
-}
e0f0a4
-google.setOnLoadCallback(function () {
e0f0a4
-    var customSearchControl = new google.search.CustomSearchControl('011012898598057286222:elxsl505o0o');
e0f0a4
-    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
e0f0a4
-    customSearchControl.setSearchStartingCallback(null, _trackQuery);
e0f0a4
-    customSearchControl.draw('cse');
e0f0a4
-},
e0f0a4
-true);//]]>
e0f0a4
 </script>
e0f0a4
diff --git a/openstackdocstheme/theme/openstackdocs/theme.conf b/openstackdocstheme/theme/openstackdocs/theme.conf
e0f0a4
index 8d0ef5b..1f7d26e 100644
e0f0a4
--- a/openstackdocstheme/theme/openstackdocs/theme.conf
e0f0a4
+++ b/openstackdocstheme/theme/openstackdocs/theme.conf
e0f0a4
@@ -4,7 +4,7 @@ stylesheet = css/basic.css
e0f0a4
 pygments_style = native
e0f0a4
 
e0f0a4
 [options]
e0f0a4
-analytics_tracking_code = UA-17511903-1
e0f0a4
+analytics_tracking_code =
e0f0a4
 sidebar_mode = toctree
e0f0a4
 display_badge = True
e0f0a4
 display_toc = True
e0f0a4
-- 
e0f0a4
2.20.1
e0f0a4