Gridsome: Loading a page with adSense disables page transition

Created on 10 Mar 2019  路  1Comment  路  Source: gridsome/gridsome

Description

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.

Steps to reproduce

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:

Expected result

Page changes when any links to the same site are clicked.

Actual result

Pages would not change however url address in the url bar of browser changes.

Environment


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

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.

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dominiquedutra picture dominiquedutra  路  17Comments

wjustice picture wjustice  路  24Comments

stowball picture stowball  路  26Comments

SteveEdson picture SteveEdson  路  19Comments

tyankatsu0105 picture tyankatsu0105  路  22Comments