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

Fixing link tracking and dropdown menus #158

Merged
merged 1 commit into from Mar 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/linktracking.js
Expand Up @@ -9,7 +9,7 @@ function _gaLt(event){
el = el.parentNode;

if(el && el.href){
if(el.href.indexOf(location.host) == -1){ /* external link */
if(el.href.indexOf(location.host) == -1 && el.getAttribute('data-toggle') != 'dropdown'){ /* 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 */
Expand Down