我正在为一个客户做一些事情,一个代理机构已经构建了一点 jQuery 来触发一个 DoubleClick Floodlight 代码,但由于某种原因该代码不起作用:
<script type="text/javascript">
$(function () {
//var origOnClick = $('#trackingButton').attr("onclick");
$('#trackingButton').click(fireFloodlight);
function fireFloodlight() {
if (Page_IsValid) {
var axel = Math.random() + "";
var a = axel * 10000000000000;
$("body").append('<img src="https://ad.doubleclick.net/activity;src=2499215;type=axa_l124;cat=lpg_g263;ord=' + a + '?" width="1" height="1" alt=""/>');
//eval(origOnClick);
}
}
});
</script>
对我来说,这个脚本看起来不错,但在实时环境中,ad.doubleclick.net
从来没有调用过“”?任何帮助将非常感激。奇怪的是,标签一直工作到本周末,但现在没有记录任何动作?
编辑:我做了一个console.log(Page_IsValid)
返回的True
.
编辑:这是相关按钮的 HTML:
<input type="submit" name="ctl00$ctl00$ctl00$BodyPlaceHolder$BodyPlaceHolder$WizardContentPlaceHolder$WizardCollectBasicSMEInfo$trackingButton" value="Get your quick quote" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ctl00$ctl00$BodyPlaceHolder$BodyPlaceHolder$WizardContentPlaceHolder$WizardCollectBasicSMEInfo$trackingButton", "", true, "Form", "", false, false))" id="trackingButton" class="button" />