Skip to content

Instantly share code, notes, and snippets.

@araddon
Created July 6, 2011 18:19
Show Gist options
  • Save araddon/1067939 to your computer and use it in GitHub Desktop.
Save araddon/1067939 to your computer and use it in GitHub Desktop.
Multitrack using Jquery, and Callbacks
<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