2016-04-25 56 views
1

我想動態插入一個AdSense單元,但我沒有得到任何點擊。動態插入AdSense單元

該廣告顯得很好,因爲我更改爲動態插入廣告單元(它放慢了我的HTML5畫布),我再也沒有收到任何點擊。

這是我所使用的代碼:

function appendAd(holder, client, slot, width, height) { 
    window.google_ad_client = client; 
    window.google_ad_slot = slot; 
    window.google_ad_width = width; 
    window.google_ad_height = height; 

    var container = document.getElementById(holder); 
    var w = document.write; 
    document.write = function (content) { 
     container.innerHTML = content; 
     document.write = w; 
    }; 

    var script = document.createElement('script'); 
    script.type = 'text/javascript'; 
    script.src = 'http://pagead2.googlesyndication.com/pagead/show_ads.js'; 
    document.body.appendChild(script); 
} 
+0

也許他們踢你打破TOS? – adeneo

+0

@adeneo將其更改回原始的AdSense單元代碼,我再次獲得點擊次數。 – Joery

回答

0

我所接觸的Adsense的支持,他們說這是不允許的。