测试&目标表单跟踪

时间:2014-11-20 17:45:29

标签: jquery html forms adobe test-and-target

我一直在使用mboxTrack()和mboxTrackLink()对测试和目标进行链接跟踪,类似于:

<a id="clickable" href="run.html">Click this</a>

<script type="text/javascript">

$('#clickable').on('click',function(e){
e.preventDefault();
mboxTrack("testmbox","",this.href);

});

</script>

这对我来说很有效。我遇到的最新问题是,如果我已经设置了一个表单,并且我想跟踪表单中的点击:

<form action="submit_this.html">
First name:<br>
<input type="text" name="firstname" value="Mickey">
<br>
Last name:<br>
<input type="text" name="lastname" value="Mouse">
<br><br>
<input type="submit" value="Submit">

</form>

如何跟踪“行动”&#39;对于此表单提交。任何建议或想法

1 个答案:

答案 0 :(得分:0)

<form action="submit_this.html">
First name:<br>
<input type="text" name="firstname" value="Mickey">
<br>
Last name:<br>
<input type="text" name="lastname" value="Mouse">
<br><br>
<input type="submit" value="Submit">
</form>

<script type="text/javascript">
$('form').on('submit',function(e){
    e.preventDefault();
    mboxTrack("testmbox","",this.action);
});
</script>