From c13127e92e579086b2b87f21e33924463ad3eb6d Mon Sep 17 00:00:00 2001 From: Derek Eder Date: Tue, 6 Jun 2023 15:24:30 -0500 Subject: [PATCH] switched from google to matomo analytics --- _layouts/default.html | 19 ++++++++++++++-- js/analytics_lib.js | 52 ------------------------------------------- 2 files changed, 17 insertions(+), 54 deletions(-) delete mode 100644 js/analytics_lib.js diff --git a/_layouts/default.html b/_layouts/default.html index fd75b6e..1b2f2d7 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -135,14 +135,29 @@

My Reps

- - + + + + diff --git a/js/analytics_lib.js b/js/analytics_lib.js deleted file mode 100644 index 7940f89..0000000 --- a/js/analytics_lib.js +++ /dev/null @@ -1,52 +0,0 @@ -/*! - * Google Analytics Library - * https://github.com/open-city/google-analytics-lib - * - * Copyright 2012, Nick Rougeux and Derek Eder of Open City - * Licensed under the MIT license. - * https://github.com/open-city/google-analytics-lib/wiki/License - * - * Date: 5/9/2012 - * - */ - -var analyticsTrackingCode = 'UA-39054699-17'; //enter your tracking code here - -var _gaq = _gaq || []; -_gaq.push(['_setAccount', analyticsTrackingCode]); -_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); -})(); - -_trackClickEventWithGA = function (category, action, label) { - if (typeof(_gaq) != 'undefined') - _gaq.push(['_setAccount', analyticsTrackingCode]); - _gaq.push(['_trackEvent', category, action, label]); -}; - -jQuery(function () { - - jQuery('a').click(function () { - var $a = jQuery(this); - var href = $a.attr("href"); - - //links going to outside sites - if (href.match(/^http/i) && !href.match(document.domain)) { - _trackClickEventWithGA("Outgoing", "Click", href); - } - - //direct links to files - if (href.match(/\.(avi|css|csv|doc|docx|exe|gif|js|jpg|mov|mp3|pdf|png|ppt|pptx|rar|txt|vsd|vxd|wma|wmv|xls|xlsx|zip)$/i)) { - _trackClickEventWithGA("Downloads", "Click", href); - } - - //email links - if (href.match(/^mailto:/i)) { - _trackClickEventWithGA("Emails", "Click", href); - } - }); -});