Javascript 在Meteor框架中添加Google双击广告
我尝试使用来自的相同代码,这对AdSense有效,但对Google DFP代码无效。GoogleJS不会触发标签中的任何代码Javascript 在Meteor框架中添加Google双击广告,javascript,meteor,adsense,google-dfp,double-click-advertising,Javascript,Meteor,Adsense,Google Dfp,Double Click Advertising,我尝试使用来自的相同代码,这对AdSense有效,但对Google DFP代码无效。GoogleJS不会触发标签中的任何代码 Template.sidebar.rendered = function() { $.getScript("//www.googletagservices.com/tag/js/gpt.js", function() { var googletag = googletag || {}; googletag.cmd = googletag.cmd || [];
Template.sidebar.rendered = function() {
$.getScript("//www.googletagservices.com/tag/js/gpt.js", function() {
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.defineSlot('/58419895/sidebar_large', [300, 600], 'div-gpt-ad-1432029985552-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
var ads = "<div id='div-gpt-ad-1432029985552-0' style='height:600px; width:300px;'>";
$("#square-long").html(ads);
return googletag.cmd.push(function() { googletag.display('div-gpt-ad-1432029985552-0'); });
});
};
Template.sidebar.rendered=function(){
$.getScript(“//www.googletagservices.com/tag/js/gpt.js”,function(){
var googletag=googletag | |{};
googletag.cmd=googletag.cmd | |[];
googletag.cmd.push(函数(){
googletag.defineSlot(“/58419895/sidebar_large”,[300600],“div-gpt-ad-143029985552-0”).addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
var ads=“”;
$(“#方长”).html(广告);
返回googletag.cmd.push(函数(){googletag.display('div-gpt-ad-143029985552-0');});
});
};
你有没有想过这个问题?没有。。。返回rails:)