F
F
Ferums2019-04-17 20:28:59
Google Adsense
Ferums, 2019-04-17 20:28:59

How to fix missing ad blocks in Vuejs + Google Adsense?

Hello. Having problems displaying ad units on Vuejs. Blocks sometimes (randomly) do not appear. This was not the case with static html. What could be the problem and how to properly integrate Adsense into a vue project?
I connect Adsense through the plugin: https://github.com/mazipan/vue-google-adsense
I tried it manually - I did not notice the difference. According to the code, I display the blocks in the footer.
Googled and found the same problem here, but there is no answer: https://stackoverflow.com/questions/51273410/adsen...
When any block disappears, an error appears in the browser console:

position-observer.js:132
Uncaught TypeError: Cannot read property 'frameElement' of null
    at S.getTargetRect (position-observer.js:132)
    at position-observer.js:94
    at na.h.fire (observable.js:84)
    at position-observer.js:65
    at d (rate-limit.js:39)
    at rate-limit.js:57

And sometimes:
160x600_banner.js:1427
Uncaught TypeError: Cannot read property 'addEventListener' of undefined
at lib._160x600_banner.frame_0 (160x600_banner.js:1427)
    at a.b._runActions (createjs-2015.11.26.min.js:17)
    at a.b.setPosition (createjs-2015.11.26.min.js:17)
    at a.b.setPosition (createjs-2015.11.26.min.js:17)
    at lib._160x600_banner.c._updateTimeline (createjs-2015.11.26.min.js:14)
    at lib._160x600_banner.c.advance (createjs-2015.11.26.min.js:14)
    at lib._160x600_banner.c._tick (createjs-2015.11.26.min.js:14)
    at a.b._tick (createjs-2015.11.26.min.js:13)
    at a.b.tick (createjs-2015.11.26.min.js:13)
    at a.b.update (createjs-2015.11.26.min.js:13)

More:
Uncaught TypeError: AdobeAn.getComposition is not a function
at init (160x600.html:1655)
at onload (VM219 160x600.html:1821)

Uncaught TypeError: cjs.Sprite is not a constructor
at 160x600.html:21
at 160x600.html:1649

What to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
partyzanx, 2021-02-03
@partyzanx

For this and other reasons, I decided to make a site that is expected to generate income from advertising, using a regular template engine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question