Created
July 6, 2011 18:19
-
-
Save araddon/1067939 to your computer and use it in GitHub Desktop.
Multitrack using Jquery, and Callbacks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" charset="utf-8"> | |
$(document).ready(function(){ | |
// show multi-track on custom event capture | |
$("a#mycustom_href").click(function(e){ | |
var href = $(this).attr('href'); | |
Webtrends.multiTrack({ | |
argsa:["DCS.dcsuri","/multitrackevents/my_custom_action","WT.convval","my_custom_action","WT.conv","1"], | |
callback:function(o){ | |
// this occurs After dcs collection or 120 ms(configureable) | |
// whichever is sooner | |
window.location = href; | |
} | |
}); | |
return false;// cancel href click so we can track | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment