我需要將Facebook跟蹤代碼添加到Drupal 7中的特定頁面。我想知道是否有將代碼添加到html.tpl.php文件的方式,一些要求將其添加到特定頁面的代碼。drupal 7將facebook跟蹤代碼添加到特定頁面
我嘗試添加的代碼這會在網頁上的塊,但是代碼被剝離出來(禁用富文本,添加代碼並保存)
這是我想補充
代碼<!-- Facebook Conversion Code for Ecuador landing page leads -->
<script>(function() {
var _fbq = window._fbq || (window._fbq = []);
if (!_fbq.loaded) {
var fbds = document.createElement('script');
fbds.async = true;
fbds.src = '//connect.facebook.net/en_US/fbds.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(fbds, s);
_fbq.loaded = true;
}
})();
window._fbq = window._fbq || [];
window._fbq.push(['track', '6026961635755', {'value':'0.00','currency':'USD'}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=6026961635755&cd[value]=0.00&cd[currency]=USD&noscript=1" /></noscript>
後,我將它保存這就是我得到
<!-- Facebook Conversion Code for Ecuador landing page leads --><noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=6026961635755&amp;cd[value]=0.00&amp;cd[currency]=USD&amp;noscript=1" /></noscript>
你試圖使塊體完整HTML – 2015-02-24 07:08:44