我正在尝试找出是否可以实施分析事件,以在Muse webpro.js中跟踪转换,以成功提交?
这是Muse webpro.js的代码,该代码执行表格提交:
Muse.Utils.initWidget('#widgetu2128', ['#bp_infinity'], function(elem) {
return new WebPro.Widget.Form(elem, {
validationEvent: 'submit',
errorStateSensitivity: 'high',
fieldWrapperClass: 'fld-grp',
formSubmittedClass: 'frm-sub-st',
formErrorClass: 'frm-subm-err-st',
formDeliveredClass: 'frm-subm-ok-st',
notEmptyClass: 'non-empty-st',
focusClass: 'focus-st',
invalidClass: 'fld-err-st',
requiredClass: 'fld-err-st',
ajaxSubmit: true
});
}); /* #widgetu2128 */
我的想法是在此处插入分析事件跟踪代码,例如:
Muse.Utils.initWidget('#widgetu2128', ['#bp_infinity'], function(elem) {
return new WebPro.Widget.Form(elem, {
validationEvent: 'submit',
errorStateSensitivity: 'high',
fieldWrapperClass: 'fld-grp',
formSubmittedClass: 'frm-sub-st',
formErrorClass: 'frm-subm-err-st',
formDeliveredClass: 'frm-subm-ok-st',
notEmptyClass: 'non-empty-st',
focusClass: 'focus-st',
invalidClass: 'fld-err-st',
requiredClass: 'fld-err-st',
onSuccess: function(){
ga('send', 'event', 'Form', 'Send', '');
},
ajaxSubmit: true
});
}); /* #widgetu2128 */
,但它似乎不起作用。任何人都有任何建议。找不到任何WebPro.js文档或在线支持此主题。
谢谢!
//validate
Muse.Utils.initWidget('#widgetu812', function(elem) {
new WebPro.Widget.Form(elem,
{
validationEvent:'submit',
errorStateSensitivity:'high',
fieldWrapperClass:'fld-grp',
formSubmittedClass:'frm-sub-st',
formErrorClass:'frm-subm-err-st',
formDeliveredClass:'frm-subm-ok-st',
notEmptyClass:'non-empty-st',
focusClass:'focus-st',
invalidClass:'fld-err-st',
requiredClass:'fld-err-st',
ajaxSubmit:true
}
);
});/* #widgetu812 */
//submit
<script> $(document).ready(function() {
$("#widgetu812").ajaxComplete(function() {
if (typeof ga !== 'undefined') {
ga('send','event','order','sent');
}
}); }); </script>