š Bug - TagError: adsbygoogle.push() error: Only one 'enable_page_level_ads' allowed per page
kieron opened this issue Ā· 2 comments
Hello, I am receiving the following console error:
adsbygoogle.js?clienā¦7677794196959549:67 Uncaught
M {message: "adsbygoogle.push() error: Only one 'enable_page_level_ads' allowed per page.", name: 'TagError', pbr: true, stack: "TagError: adsbygoogle.push() error: Only one 'enabā¦js/adsbygoogle.js?client=7677794196959549:73:107)"}
message: "adsbygoogle.push() error: Only one 'enable_page_level_ads' allowed per page."
name: "TagError"
pbr: true
stack: "TagError: adsbygoogle.push() error: Only one 'enable_page_level_ads' allowed per page.\n at Tn (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=7677794196959549:223:326)\n at Sn (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=7677794196959549:222:550)\n at Zn (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=7677794196959549:229:365)\n at c (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=7677794196959549:230:38)\n at $n (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=7677794196959549:230:156)\n at ko (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=7677794196959549:238:248)\n at ao (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=7677794196959549:234:451)\n at https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=7677794196959549:231:47\n at Qd.n.ma (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=7677794196959549:67:804)\n at Yd (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=7677794196959549:73:107)"
[[Prototype]]: Error
constructor: Ę M(a)
[[Prototype]]: Object
Picture of the error if it's easier:
I have my main.js
set up like this, and this is the only code I have added, relating to this ad package, so hopefully I am not just missing something silly :)
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import SvgIcon from "./util/SvgIcon.vue";
import Ads from "vue-google-adsense";
import "@/assets/css/tailwind.css";
Vue.use(require("vue-script2"));
Vue.use(Ads.AutoAdsense, { adClient: "7677794196959549", isNewAdsCode: true });
Vue.config.productionTip = false;
Vue.component("SvgIcon", SvgIcon);
new Vue({
router,
store,
render: (h) => h(App),
}).$mount("#app");
I was hoping to just try these auto-ads out, and let Google do its thing & see what happens, so I enabled Auto ads on the AdSense side of things, but yeah currently getting this.
I can censor my ad ID's but I guess they're public anyway in the source of the site.
Thanks in advance!
I was getting the same error, and the error went away when I changed 'isNewAdsCode' to be false. Alternatively, you could remove that parameter from the 'use' call entirely, as if defaults to false.
I got the same error and used the solution proposed by @JessePost1
The error is probably because the Auto Ads Components pushes the code after the script loads.
I think the conflict is that probably the new way of loading the library (by sending the published ID) does the same thing.