When I open a gridsome page with an embedded adSense, clicking on any links to the internal site in the page does not do anything. Clicking on external links do work however.
Please refer to this gist: https://gist.github.com/BeFiveINFO/e0f674479365f226a2816d30eab52b9f
The git has three files. Component for Adsense, an example page layout template, and main.js file to show that adsbygoogle.js is to be loaded in the head with async. This issue persists even when the ad is blocked by adBlocker.
These are my blog page that exhibit the issue:
However all other pages without the Adsense does not:
Page changes when any links to the same site are clicked.
Pages would not change however url address in the url bar of browser changes.
Libs:
- gridsome version: Gridsome v0.5.4
Browser:
- [X] Chrome (desktop) version XX
- [X] Firefox version XX
- [X ] Safari (desktop) version XX
For Tooling issues:
- Node version: node v8.15.1 (npm v6.4.1)
- Platform: netlify
Sorry but it has been resolved.
After reading this comment:
https://github.com/gridsome/gridsome-starter-default/issues/2#issuecomment-436409251
I checked html with https://validator.w3.org/ and I found out that there were bunch of "Error: Start tag a seen but an element of the same type was already open." It started working right after fixing the errors.
Just in case for anyone that is interested to integrate google Adsense with Gridsome:
https://gist.github.com/BeFiveINFO/e0f674479365f226a2816d30eab52b9f
The above is a copy and paste from NPM vue-adsense. As the package did not work by importing, I had to convert the package into a component instead.
Most helpful comment
Sorry but it has been resolved.
After reading this comment:
https://github.com/gridsome/gridsome-starter-default/issues/2#issuecomment-436409251
I checked html with https://validator.w3.org/ and I found out that there were bunch of "Error: Start tag a seen but an element of the same type was already open." It started working right after fixing the errors.
Just in case for anyone that is interested to integrate google Adsense with Gridsome:
https://gist.github.com/BeFiveINFO/e0f674479365f226a2816d30eab52b9f
The above is a copy and paste from NPM vue-adsense. As the package did not work by importing, I had to convert the package into a component instead.