Skip to content

Commit 4dd01a7

Browse files
committed
Added completed event + some bug fixes
1 parent b054fb3 commit 4dd01a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: js/jquery.analytics-event-tracking.min.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
* @version 0.1.0
99
* @requires jQuery 1.7+
1010
*/
11-
(function(a){a.fn.analyticsEventTracking=function(b){var d=a.extend({selector:".track",default_category:"General"},b);if(typeof ga!=="function"){c("Google Analytics (analytics.js) is not initialized.");return false}return a(this).each(function(){var e=a(this);g();function g(){e.find(d.selector).on("click",function(h){f("click",a(this))});e.find(d.selector+"-blur").on("blur",function(h){_this.trackEvent("blur",a(this))});e.find(d.selector+"-focus").on("focus",function(h){_this.trackEvent("focus",a(this))});e.find(d.selector+"-mouseover").on("mouseover",function(h){_this.trackEvent("mouseover",a(this))})}function f(m,i){var j=i.data("category")||d.default_category;var l=i.data("action")||interaction;var h=i.data("label")||"";var k=i.data("value")||1;ga("send","event",j,l,h,k)}});function c(e){if(typeof console==="object"){console.log(e)}}}}(jQuery));
11+
(function(a){a.fn.analyticsEventTracking=function(b){var d=a.extend({selector:".track",default_category:"General"},b);if(typeof ga!=="function"){c("Google Analytics (analytics.js) is not initialized.");return false}return a(this).each(function(){var e=a(this);g();function g(){e.find(d.selector).on("click",function(h){f("click",a(this))});e.find(d.selector+"-blur").on("blur",function(h){f("blur",a(this))});e.find(d.selector+"-complete").on("blur",function(h){if(a.trim(a(this).val())!=""){f("complete",a(this))}});e.find(d.selector+"-focus").on("focus",function(h){f("focus",a(this))});e.find(d.selector+"-mouseover").on("mouseover",function(h){f("mouseover",a(this))});e.find(d.selector+"-change").on("change",function(h){f("change",a(this))})}function f(m,i){var j=i.data("category")||d.default_category;var l=i.data("action")||interaction;var h=i.data("label")||"";var k=i.data("value")||1;ga("send","event",j,l,h,k)}});function c(e){if(typeof console==="object"){console.log(e)}}}}(jQuery));

0 commit comments

Comments
 (0)