If ad plugin doesn’t work
-
Hi does the VAST plugin work with Exoclick vast code? If it doesn’t work could I request a refund after?
-
The Ads plugin is pretty agnostic about platforms so it should work with any VAST code. I will definitely give you a refund if it doesn’t work.
-
This reply was modified 4 years, 8 months ago by
Kyle Gilman.
Thank you! I will try it now
Do you know how to configure wp-rocket so that the video plugin doesn’t break?
I’m getting errors like “Uncaught TypeError: Cannot read property ‘getTech’ of undefined”, “Uncaught TypeError: Cannot read property ‘registerPlugin’ of undefined”, “Uncaught Error: IMA SDK is either not loaded from a google domain or is not a supported version.”, “Uncaught TypeError: player.ima is not a function”.
-
This reply was modified 4 years, 8 months ago by
Mark.
It’s a commercial plugin so I don’t have access to it for testing. Does my plugin work if wp-rocket is disabled? Have you completely cleared the wp-rocket cache? It sounds like wp-rocket is not loading the necessary JS files, possibly because they’re only loaded on pages that have my plugin in them, or they’re loaded in the wrong order. Is there a wp-rocket setting that allows for conditionally loading JavaScripts or some way you can manually add Javascript files?
Hi,
I found out the problem. Turns out it was the “Minify Javascript files” in wp-rocket that causing the problem. All I have to do is exclude these 2 files
/wp-content/plugins/videopack-ads/public/js/(.*).js /js/sdkloader/ima3.jsHi,
another problem came up. This time it’s the Cloudflare rocket loader problem. Is there a way to add data-cfasync=”false” infront of the plugin script? For example
<script data-cfasync="false" src="/javascript.js"></script>-
This reply was modified 4 years, 8 months ago by
Mark.
I’ll take a look at it. I want to make sure it won’t cause problems for other users, but it seems like a good idea.
I went through the trouble of figuring out how to add the custom cfasync tag to enqueued JavaScripts before I actually tested Rocket Loader and I found that enabling Rocket Loader only caused problems after the cfasync tags are added. Without the cfasync tags and with Rocket Loader enabled my plugin runs fine. I’ve enabled Rocket Loader here https://www.wordpressvideopack.com/add-ons/videopack-ads/
Can you post a link to your site so I can examine the problem? It seems likely that selectively excluding the Videopack Ads JS files from the wp-rocket minify routine and then changing the order that scripts load using Rocket Loader is more likely the issue. You might need to exclude the JS files loaded by Videopack (wp-content/video-embed-thumbnail-generator) as well. I’d also recommend testing whether you see any real benefit in page loading speed with these optimizations.
-
This reply was modified 4 years, 8 months ago by
The topic ‘If ad plugin doesn’t work’ is closed to new replies.