Created
July 12, 2011 20:08
-
-
Save araddon/1078858 to your computer and use it in GitHub Desktop.
Form submit with jquery, multitrack
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 | |
$("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