【发布时间】:2015-12-13 23:42:14
【问题描述】:
我正在尝试将 bing 转换脚本添加到我的 magento 网站中。
我知道我需要将此代码添加到网站的标题中
<script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"XXXXXXX"};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq");</script><noscript><img src="//bat.bing.com/action/0?ti=XXXXXXX&Ver=2" height="0" width="0" style="display:none; visibility: hidden;" /></noscript>
**** 删除了 XXXXX ****** 的 bing id
但是我需要在结帐成功页面中传递一个变量转换值,所以我是否将以下脚本添加到成功页面?
<script>
window.uetq = window.uetq || [];
window.uetq.push({ 'gv': '<?php echo $order->getBaseGrandTotal(); ?>'}); // Pass the computed revenue
</script>
上面的代码脚本看起来是否适合将最终的 magento 价格传递到每个页面头部的主脚本?
谢谢..
【问题讨论】:
标签: javascript php magento ads bing