Blob Blame History Raw
From 21b6f4101a5c04cd8e2e959f4bfb8932af6267b6 Mon Sep 17 00:00:00 2001
From: Alfredo Moralejo <amoralej@redhat.com>
Date: Mon, 1 Jun 2020 15:13:26 +0200
Subject: [PATCH] Remove all Google Analytics tracking

Even if https://github.com/openstack/openstackdocstheme/commit/89b0475539ac6763baa27f5fc334639ee3853ebf
made Google Analytics optional, it was still present in
script_search.html
---
 .../theme/openstackdocs/script_search.html    | 26 -------------------
 .../theme/openstackdocs/theme.conf            |  2 +-
 2 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/openstackdocstheme/theme/openstackdocs/script_search.html b/openstackdocstheme/theme/openstackdocs/script_search.html
index 8a62dc6..1141d82 100644
--- a/openstackdocstheme/theme/openstackdocs/script_search.html
+++ b/openstackdocstheme/theme/openstackdocs/script_search.html
@@ -1,28 +1,2 @@
-<script src="https://www.google.com/jsapi" type="text/javascript"></script>
 <script type="text/javascript">
- //<![CDATA[
-google.load('search', '1', {
-    language: 'en'
-});
-var _gaq = _gaq ||[];
-_gaq.push([ "_setAccount", "UA-17511903-1"]);
-function _trackQuery(control, searcher, query) {
-    var gaQueryParamName = "q";
-    var loc = document.location;
-    var url =[
-    loc.pathname,
-    loc.search,
-    loc.search ? '&': '?',
-    gaQueryParamName == '' ? 'q': encodeURIComponent(gaQueryParamName),
-    '=',
-    encodeURIComponent(query)].join('');
-    _gaq.push([ "_trackPageview", url]);
-}
-google.setOnLoadCallback(function () {
-    var customSearchControl = new google.search.CustomSearchControl('011012898598057286222:elxsl505o0o');
-    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
-    customSearchControl.setSearchStartingCallback(null, _trackQuery);
-    customSearchControl.draw('cse');
-},
-true);//]]>
 </script>
diff --git a/openstackdocstheme/theme/openstackdocs/theme.conf b/openstackdocstheme/theme/openstackdocs/theme.conf
index 8d0ef5b..1f7d26e 100644
--- a/openstackdocstheme/theme/openstackdocs/theme.conf
+++ b/openstackdocstheme/theme/openstackdocs/theme.conf
@@ -4,7 +4,7 @@ stylesheet = css/basic.css
 pygments_style = native
 
 [options]
-analytics_tracking_code = UA-17511903-1
+analytics_tracking_code =
 sidebar_mode = toctree
 display_badge = True
 display_toc = True
-- 
2.20.1