Created
September 6, 2011 16:38
-
-
Save araddon/1198092 to your computer and use it in GitHub Desktop.
Form Events Multitrack
This file contains hidden or 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"> | |
| // this function is called by webtrends.js after it has loaded | |
| window.webtrendsAsyncInit = function() { | |
| var dcs=new Webtrends.dcs().init({dcsid:"your_dcs_id",timezone:-8}) | |
| .addSelector('form input, form select', // find form inputs, or form selects | |
| { | |
| domEvent:'onblur', // which event to listen to? | |
| transform:function(dcs,o){ | |
| // o is an 'options' object with o.element (dom element), o.args (object notation args) | |
| o.args['fieldname'] = o.element.id; | |
| }, | |
| args:{ | |
| "DCS.dcsuri":"/multitrackevents/form" | |
| } | |
| } | |
| ).track(); | |
| }; | |
| (function() { | |
| var s = document.createElement('script'); s.type="text/javascript"; s.async = true; | |
| s.src = 'http://s.webtrends.com/js/webtrends.js'; | |
| var s2=document.getElementsByTagName("script")[0];s2.parentNode.insertBefore(s,s2); | |
| }()); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment