This is an automated email from the ASF dual-hosted git repository.
wave pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openoffice-org.git
The following commit(s) were added to refs/heads/main by this push:
new e4f3c09d6c Remove Google Analytics Traces (#66)
e4f3c09d6c is described below
commit e4f3c09d6c7ff8d072c419c73e0814241bf5fe6a
Author: Dave Fisher <[email protected]>
AuthorDate: Wed Jul 12 12:27:08 2023 -0700
Remove Google Analytics Traces (#66)
---
assets/scripts/entourage.js | 80 --------------------------------------
assets/scripts/google-analytics.js | 14 -------
templates/CMS_README.txt | 7 ----
templates/README.md | 2 -
4 files changed, 103 deletions(-)
diff --git a/assets/scripts/entourage.js b/assets/scripts/entourage.js
deleted file mode 100644
index b634387260..0000000000
--- a/assets/scripts/entourage.js
+++ /dev/null
@@ -1,80 +0,0 @@
-<script type="text/javascript">
-/*!
- * Entourage 1.1.2 - Automatic Download Tracking for Asynchronous Google
Analytics
- *
- * Copyright (c) 2011 by Tian Valdemar Davis (http://techoctave.com/c7)
- * Licensed under the MIT (http://en.wikipedia.org/wiki/MIT_License) license.
- *
- * Learn More:
http://techoctave.com/c7/posts/58-entourage-js-automatic-download-tracking-for-asynchronous-google-analytics
- *
- * 2012-04-24 Mod by robweir to whitelist additional file extensions as used
in AOO project
- * 2012-04-25 Mod by robweir to remove trailing "/download" from SourceForge
file names, a hack we can hopefully remove someday
- */
-
-/*jshint strict:false */
-
-(function() {
-var entourage = new (function() {
- var version = "1.1.2";
- var whitelist =
/\.pdf$|\.zip$|\.gz$|\.gz\/download$|\.bz2$|\.bz2\/download$|\.od*|\.doc*|\.xls*|\.ppt*|\.exe$|\.exe\/download$|\.dmg$|\.dmg\/download$|\.mov$|\.avi$|\.mp3$/i;
-
- //Get true FileName from link pathname
- var getFileName = function(pathname) {
- //Remove the anchor at the end (if one exists)
- pathname = pathname.substring(0, (pathname.indexOf("#") === -1)
? pathname.length : pathname.indexOf("#"));
-
- //Removes the query after the file pathname (if one exists)
- pathname = pathname.substring(0, (pathname.indexOf("?") === -1)
? pathname.length : pathname.indexOf("?"));
-
- //Remove trailing /download
- if (/\/download$/.test(pathname))
- pathname = pathname.substring(0,
pathname.length-"/download".length);
-
- //Removes everything before the last slash in the path
- pathname = pathname.substring(pathname.lastIndexOf("/") + 1,
pathname.length);
-
- return pathname;
- };
-
- var autograph = function() {
- var fileName, associate;
-
- //Get the file name
- fileName = getFileName(this.pathname); //The link object is now
available in "this"
-
- //Add file to the Google Analytics Queue
- associate = '/download/' + fileName;
-
- //Track download using Asynchronous Google Analytics
- _gaq.push(['_trackPageview', associate]);
- };
-
- var initialize = function() {
- var links = document.links;
-
- for (var i = 0, l = links.length; i < l; i++) {
- //Compare the fileType to the whitelist
- var match = links[i].pathname.match(whitelist);
-
- //If the link is for a file download . . .
- if (typeof match !== "undefined" && match !== null) {
- //Call Entourage whenever the link is clicked
- links[i].onclick = autograph;
- }
- }
- };
-
- return {
- version: version,
- initialize: initialize
- };
-})(); //Entourage.js
-
-//Add entourage to the global namespace
-window.entourage = entourage;
-
-//Execute entourage onload - ensuring links are present in the DOM
-window.onload = entourage.initialize;
-})();
-</script>
-
diff --git a/assets/scripts/google-analytics.js
b/assets/scripts/google-analytics.js
deleted file mode 100644
index e2acbc6504..0000000000
--- a/assets/scripts/google-analytics.js
+++ /dev/null
@@ -1,14 +0,0 @@
-<script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-98607986-1']);
- _gaq.push(['_setDomainName', 'openoffice.org']);
- _gaq.push (['_gat._anonymizeIp']);
- _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>
-
diff --git a/templates/CMS_README.txt b/templates/CMS_README.txt
index b265d4a6e2..25983daf18 100644
--- a/templates/CMS_README.txt
+++ b/templates/CMS_README.txt
@@ -114,8 +114,6 @@ See lib/path.pm
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
{% if headers.css %}<link href="{{ headers.css }}" rel="stylesheet"
type="text/css">{% endif %}
{% endif %}
-<!--#include virtual="/scripts/google-analytics.js" -->
-<!--#include virtual="/scripts/entourage.js" -->
</head>
<body{% if bodytag %} {{ bodytag|safe }}{% endif %}>
<!--#include virtual="{{ ssi.headers.brand }}" -->
@@ -197,15 +195,10 @@ h2:hover > .headerlink, h3:hover > .headerlink, h1:hover
> .headerlink, h6:hover
/scripts/
api.simile-widgets.org - used for stats time plots.
-entourage.js - ssi included tracking downloads somehow.
-google-analytics.js - ssi included
jquery-1.11.2.min.js - upgrade?
ooo.js
sorttable.js - other copies used
tableDecorate.js - other copies used
scripts are not optimized and not really normalized.
-ssi including entourage.js on all pages is a little silly. It only makes sense
on download pages.
-
-We need to determine google-analytics vs. ASF foundation policy.
diff --git a/templates/README.md b/templates/README.md
index 0944e7510c..0ac02e0cb6 100644
--- a/templates/README.md
+++ b/templates/README.md
@@ -44,8 +44,6 @@ This describes the Simple Groovy templates (GSP) that are
used to build the site
The following SSI files may be used.
- `/doctype.html`
- - `/scripts/google-analytics.js`
- - `/scripts/entourage.js`
- content.brand
- content.topnav
- content.leftnav (optional)