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