vue-google-adsense icon indicating copy to clipboard operation
vue-google-adsense copied to clipboard

🐛 Bug - Ads showing only on full page reload and not working on route change

Open kovaletsyurii opened this issue 4 years ago • 3 comments

A brief description about the bug/error

Ads showing only on page reload. Nothing shows when I changed the route by using nuxt-link.

Config you use

Here is the config that I use:

import Vue from 'vue'
import Ads from 'vue-google-adsense'

Vue.use(require('vue-script2'))

Vue.use(Ads.AutoAdsense, { adClient: 'ca-pub-***' })

//nuxt plugins section: 
{ src: '~plugins/ads.js', ssr: false },

Existing vs Expectation

I expect to see ads all the time, including client-side navigation.

kovaletsyurii avatar May 20 '21 15:05 kovaletsyurii

Looks like issue only with auto ads

kovaletsyurii avatar May 21 '21 14:05 kovaletsyurii

Is it solve by #163 released?

mazipan avatar Jul 28 '21 14:07 mazipan

if you're using nuxt-link or router-link, you should change to use <a>: <a :href="item.slug">{{ item.name }}</a> -Nuxt will load ssr page, it will displays the auto ads for you. I have this issue too, but when i change to use <a>element, auto ads always display. thanks you.

hiepth1988 avatar Sep 03 '21 11:09 hiepth1988