Skip to content
This repository has been archived by the owner. It is now read-only.

Update to link tracking #33

Merged
merged 1 commit into from
Mar 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions js/linktracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function _gaLt(event){
if(el && el.href){
if(el.href.indexOf(location.host) == -1){ /* external link */
_gaq.push(["_trackEvent", "Outgoing Links", el.href, document.location.pathname + document.location.search]);
_gaq.push(["b._trackEvent", "Outgoing Links", el.href, document.location.pathname + document.location.search]);
/* if target not set then delay opening of window by 0.5s to allow tracking */
if(!el.target || el.target.match(/^_(self|parent|top)$/i)){
setTimeout(function(){
Expand Down