You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2016/12/23 00:43:53 UTC

[1/2] incubator-guacamole-website git commit: Consider opening the context menu on a download link to be a download.

Repository: incubator-guacamole-website
Updated Branches:
  refs/heads/master d5a14b476 -> 36427fc91


Consider opening the context menu on a download link to be a download.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-website/commit/b6b80d79
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-website/tree/b6b80d79
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-website/diff/b6b80d79

Branch: refs/heads/master
Commit: b6b80d797f9bcd0ce0a48ca93e0aa7071d59b8c4
Parents: d5a14b4
Author: Michael Jumper <mj...@apache.org>
Authored: Wed Dec 21 22:07:23 2016 -0800
Committer: Michael Jumper <mj...@apache.org>
Committed: Wed Dec 21 22:07:23 2016 -0800

----------------------------------------------------------------------
 _includes/download-list.html        | 14 ++++++++------
 _includes/legacy-download-list.html | 14 ++++++++------
 _layouts/default.html               | 27 +++++++++++++++++++++++++++
 3 files changed, 43 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-website/blob/b6b80d79/_includes/download-list.html
----------------------------------------------------------------------
diff --git a/_includes/download-list.html b/_includes/download-list.html
index 0413e3c..fa185a8 100644
--- a/_includes/download-list.html
+++ b/_includes/download-list.html
@@ -6,12 +6,14 @@
                 {% assign dist = include.checksum-root | append: include.path %}
                 {% assign basename = file | split: "/" | last %}
                 <td><a href="{{ mirror | append: file }}"
-                       onclick="ga('send', 'event', {
-                           eventCategory : 'Download',
-                           eventAction   : 'click',
-                           eventLabel    : '{{ basename }}',
-                           transport     : 'beacon'
-                       })">{{ basename }}</a></td>
+                       onclick="trackDownload(
+                           'click',
+                           '{{ basename }}'
+                       )"
+                       oncontextmenu="trackDownload(
+                           'menu',
+                           '{{ basename }}'
+                       )">{{ basename }}</a></td>
                 <td>[ <a href="{{ dist | append: file }}.md5">MD5</a> ]</td>
                 <td>[ <a href="{{ dist | append: file }}.sha">SHA</a> ]</td>
                 <td>[ <a href="{{ dist | append: file }}.asc">PGP</a> ]</td>

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-website/blob/b6b80d79/_includes/legacy-download-list.html
----------------------------------------------------------------------
diff --git a/_includes/legacy-download-list.html b/_includes/legacy-download-list.html
index e753ef2..d71c6cb 100644
--- a/_includes/legacy-download-list.html
+++ b/_includes/legacy-download-list.html
@@ -5,12 +5,14 @@
     <ul>
         {% for entry in include.entries %}
             <li><a href="{{ entry[1] | prepend: site.baseurl }}"
-                   onclick="ga('send', 'event', {
-                       eventCategory : 'Download',
-                       eventAction   : 'click',
-                       eventLabel    : '{{ entry[1] | split: "/" | last }}',
-                       transport     : 'beacon'
-                   })">{{ entry[0] }}</a></li>
+                   onclick="trackDownload(
+                       'click',
+                       '{{ entry[1] | split: "/" | last }}'
+                   )"
+                   oncontextmenu="trackDownload(
+                       'menu',
+                       '{{ entry[1] | split: "/" | last }}'
+                   )">{{ entry[0] }}</a></li>
         {% endfor %}
     </ul>
 {% endif %}

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-website/blob/b6b80d79/_layouts/default.html
----------------------------------------------------------------------
diff --git a/_layouts/default.html b/_layouts/default.html
index 3f5e6ac..71140f4 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -27,5 +27,32 @@
           ga('send', 'pageview');
         </script>
 
+        <!-- Download tracking helper function -->
+        <script type="text/javascript">
+
+            /**
+             * Signals Google Analytics that a file is being downloaded (or, at
+             * least, we expect that it is). Note that it is not possible to
+             * determine this with 100% certainty without grepping server logs,
+             * but this should still at least help gauge interest/usage.
+             *
+             * @param {String} action
+             *     A human-readable string describing the user event which
+             *     occurred to initiate the download.
+             *
+             * @param {String} filename
+             *     The filename of the file being downloaded.
+             */
+            function trackDownload(action, filename) {
+                ga('send', 'event', {
+                    eventCategory : 'Download',
+                    eventAction   : action,
+                    eventLabel    : filename,
+                    transport     : 'beacon'
+                });
+            }
+
+        </script>
+
     </body>
 </html>


[2/2] incubator-guacamole-website git commit: Merge new menu tracking event for download page.

Posted by jm...@apache.org.
Merge new menu tracking event for download page.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-website/commit/36427fc9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-website/tree/36427fc9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-website/diff/36427fc9

Branch: refs/heads/master
Commit: 36427fc9156d9598111341ebb89fbd5d00c0e16d
Parents: d5a14b4 b6b80d7
Author: James Muehlner <ja...@guac-dev.org>
Authored: Thu Dec 22 16:43:14 2016 -0800
Committer: James Muehlner <ja...@guac-dev.org>
Committed: Thu Dec 22 16:43:14 2016 -0800

----------------------------------------------------------------------
 _includes/download-list.html        | 14 ++++++++------
 _includes/legacy-download-list.html | 14 ++++++++------
 _layouts/default.html               | 27 +++++++++++++++++++++++++++
 3 files changed, 43 insertions(+), 12 deletions(-)
----------------------------------------------------------------------