Cant insert scripts, JSON error
-
I cannot get 3rd party script to fire when the conditional is active. Troubleshooting I see that when the plugin is activated I get this JSON parse error in the logs implicating the named Moove plugin JS AJAX success action:
jquery-migrate.min.js?ver=1.4.1:2 JQMIGRATE: Migrate is installed, version 1.4.1 VM1534:1 Uncaught SyntaxError: Unexpected token < in JSON at position 1 at JSON.parse (<anonymous>) at Object.success (main.js?ver=1.1.1:1) at i (jquery.js?ver=1.12.4:2) at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2) at y (jquery.js?ver=1.12.4:4) at XMLHttpRequest.c (jquery.js?ver=1.12.4:4) (anonymous) @ main.js?ver=1.1.1:1 i @ jquery.js?ver=1.12.4:2 fireWith @ jquery.js?ver=1.12.4:2 y @ jquery.js?ver=1.12.4:4 c @ jquery.js?ver=1.12.4:4 XMLHttpRequest.send (async) send @ jquery.js?ver=1.12.4:4 ajax @ jquery.js?ver=1.12.4:4 n.(anonymous function) @ jquery.js?ver=1.12.4:4 (anonymous) @ main.js?ver=1.1.1:1 init @ main.js?ver=1.1.1:1 fire @ main.js?ver=1.1.1:1 loadEvents @ main.js?ver=1.1.1:1 i @ jquery.js?ver=1.12.4:2 fireWith @ jquery.js?ver=1.12.4:2 ready @ jquery.js?ver=1.12.4:2 K @ jquery.js?ver=1.12.4:2
You’ll notice the at Object.success (main.js?ver=1.1.1:1) … that’s the Moove plugin. The triggering event being action:”moove_gdpr_get_scripts”,strict:e.strict,thirdparty:e.thirdparty,advanced:e.advanced} …
Consequently any basic 3rd party script will fail to fire due to that JSON error, for example a failing script:
<script>alert(‘test’);</script>
fails to write to the page, and fails fire in any position, head, body, footer.
I suspect that the JSON parse error is the cause.
- The topic ‘Cant insert scripts, JSON error’ is closed to new replies.