Skip to content

Commit

Permalink
Merge pull request #192 from aharikrishnan/master
Browse files Browse the repository at this point in the history
Bugfix: track all analytics for a page with multiple tracking code
  • Loading branch information
asual committed Sep 25, 2014
2 parents 870ed7a + 95e5a81 commit 3506aae
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/jquery.address.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,19 @@
.replace(/\/\//, '/').replace(/^\/$/, '');
if ($.isFunction(fn)) {
fn(value);
} else if ($.isFunction(_t.urchinTracker)) {
} else {
if ($.isFunction(_t.urchinTracker)) {
_t.urchinTracker(value);
} else if (_t.pageTracker !== UNDEFINED && $.isFunction(_t.pageTracker._trackPageview)) {
_t.pageTracker._trackPageview(value);
} else if (_t._gaq !== UNDEFINED && $.isFunction(_t._gaq.push)) {
_t._gaq.push(['_trackPageview', decodeURI(value)]);
} else if ($.isFunction(_t.ga)) {
_t.ga('send', 'pageview', value);
}
if (_t.pageTracker !== UNDEFINED && $.isFunction(_t.pageTracker._trackPageview)) {
_t.pageTracker._trackPageview(value);
}
if (_t._gaq !== UNDEFINED && $.isFunction(_t._gaq.push)) {
_t._gaq.push(['_trackPageview', decodeURI(value)]);
}
if ($.isFunction(_t.ga)) {
_t.ga('send', 'pageview', value);
}
}
}
},
Expand Down

0 comments on commit 3506aae

Please sign in to comment.