From 482d8e2adaa0a40e6abc3e92868b9cf777bd4ce1 Mon Sep 17 00:00:00 2001 From: "CKAN data.gov.au" Date: Thu, 22 May 2014 06:59:28 +0000 Subject: [PATCH] Use universal analytics --- .../googleanalytics_event_tracking.js | 2 +- .../snippets/googleanalytics_header.html | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ckanext/googleanalytics/fanstatic_library/googleanalytics_event_tracking.js b/ckanext/googleanalytics/fanstatic_library/googleanalytics_event_tracking.js index 10a50b3..34cdd5f 100644 --- a/ckanext/googleanalytics/fanstatic_library/googleanalytics_event_tracking.js +++ b/ckanext/googleanalytics/fanstatic_library/googleanalytics_event_tracking.js @@ -8,7 +8,7 @@ this.ckan.module('google-analytics', function(jQuery, _) { jQuery('a.resource-url-analytics').on('click', function() { var resource_url = encodeURIComponent(jQuery(this).prop('href')); if (resource_url) { - _gaq.push(['_trackEvent', 'Resource', 'Download', resource_url]); + ga('send', 'event', 'Resource', 'Download', resource_url]); } }); } diff --git a/ckanext/googleanalytics/templates/googleanalytics/snippets/googleanalytics_header.html b/ckanext/googleanalytics/templates/googleanalytics/snippets/googleanalytics_header.html index 863a1e6..1486393 100644 --- a/ckanext/googleanalytics/templates/googleanalytics/snippets/googleanalytics_header.html +++ b/ckanext/googleanalytics/templates/googleanalytics/snippets/googleanalytics_header.html @@ -1,11 +1,10 @@