Skip to content

Commit

Permalink
This will fix links that are broken if people block google analytics …
Browse files Browse the repository at this point in the history
…tracking (#69)

Closes #62
  • Loading branch information
reconbot committed May 17, 2016
1 parent f89b831 commit 7d771d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions public/tracking/event_track.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ if (typeof jQuery != 'undefined') {
var el = jQuery(this);
var track = true;
var href = (typeof(el.attr('href')) != 'undefined' ) ? el.attr('href') : '';
// if tracking fails just goto the link after 300ms
if (href) {
setTimeout(function(){
window.location.href = href;
}, 300);
}
var isThisDomain = href.match(document.domain.split('.').reverse()[1] + '.' + document.domain.split('.').reverse()[0]);
if (!href.match(/^javascript:/i)) {
var elEv = []; elEv.value=0, elEv.non_i=false;
Expand Down

0 comments on commit 7d771d0

Please sign in to comment.