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

not getting correct page view metrics in adsense

Open gnwankpa opened this issue 6 years ago • 5 comments

Hi ! First of all thanks for your great adsense package! The ads work great... unfortunately I am not getting the right reporting of page views to adsense. I use another package "vue-analytics" which delivers the right number of page views but this one only records a page view as a single visit and not the navigation to other pages on the site. Are you aware of anything like this or know how to fix?

I am using the default ads like this.. (only way I got it to work, I removed the ad-slot piece)

<Adsense
          data-ad-client="ca-pub-XXXXXXXXXXX">
</Adsense>

gnwankpa avatar Aug 13 '18 14:08 gnwankpa

Vuepress has the same issue

marslord avatar Jul 05 '19 10:07 marslord

Thanks, @gnwankpa ad-slot attribute was the reason of the ads to not showing, weird! Is there any other way to put slot name??

amismailz avatar Apr 18 '21 15:04 amismailz

Can you show me what kind of slot name do you mean @amismailz ?

mazipan avatar Apr 19 '21 09:04 mazipan

@mazipan Like this:

<Adsense
   data-ad-client="ca-pub-XXXXXXXXXXXXXXXX"
   data-ad-slot="/21943662632/Mobile_300x250_Middle">
</Adsense>

amismailz avatar Apr 19 '21 12:04 amismailz

The prop data-ad-slot is accepting string. So you can pass any string value.

Didn't this work?

<Adsense
   data-ad-client="ca-pub-XXXXXXXXXXXXXXXX"
   data-ad-slot="/21943662632/Mobile_300x250_Middle">
</Adsense>

mazipan avatar Apr 19 '21 15:04 mazipan