Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove click_tracking.js for now

  • Loading branch information...
commit 00b2bf59e0d0431d2250f9eae7ecf68b3829133d 1 parent 798838a
@eduardocereto eduardocereto authored
Showing with 0 additions and 49 deletions.
  1. +0 −49 src/plugins/click_tracking.js
View
49 src/plugins/click_tracking.js
@@ -1,49 +0,0 @@
-/**
- * GAS - Google Analytics on Steroids
- *
- * Click Tracking Plugin
- *
- * Copyright 2012, Cardinal Path
- * Licensed under the GPLv3 license.
- *
- * @author Eduardo Cereto <eduardocereto@gmail.com>
- */
-
-/**
- * Enable click tracking for class ga_track or opts.css_class
- *
- * @this {GasHelper} GA Helper object.
- * @param {object} opts The url to check.
- */
-function _clickTracking(opts) {
- var gh = this;
- opts = opts || {};
- opts['css_class'] = opts['css_class'] || ['ga_track'];
- opts['category'] = opts['category'] || 'Click Tracking';
- var re = opts['css_class'].join('|');
- gh._addEventListener(document, 'mousedown', function (me) {
- for (var el = me.target; el.nodeName !== 'HTML'; el = el.parentNode)
- {
- if (el && el.className && el.className.match(re) !== null) {
- for (var i in opts['css_class']) {
- _gas.push(['_trackEvent', opts['category'], 'click']);
- break;
- }
- }
- if (!el || el.parentNode === null) {
- break;
- }
- }
-
- }, true);
-
- return false;
-}
-
-/**
- * GAS Hook, receive the extensions to extend default extensions. And trigger
- * the binding of the events.
- */
-_gas.push(['_addHook', '_gasClickTracking', _clickTracking]);
-
-
Please sign in to comment.
Something went wrong with that request. Please try again.