Skip to content

Instantly share code, notes, and snippets.

@araddon
Created July 12, 2011 20:08
Show Gist options
  • Save araddon/1078858 to your computer and use it in GitHub Desktop.
Save araddon/1078858 to your computer and use it in GitHub Desktop.
Form submit with jquery, multitrack
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// show multi-track on custom event capture
$("form #myform").submit(function(e){
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
$("form #myform")[0].submit();
}
});
return false;// cancel initial form submit so we can track
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment