[Question] How to get a survey script working in Magento 2 – Uncaught ReferenceError: Survey is not defined

We have this script from our marketing automation platform:

<bento-survey-form id="old-glade-12345" type="popup" delay="5"></bento-survey-form> 

However after simply adding it into the header we get the error:

Uncaught ReferenceError: Survey is not defined 

We tried fixing this by adding it via

requirejs-config.js

var config = { paths: { Survey: 'V4U_BentoSurvey/js/survey.jquery.min' }, shim: { Survey: { deps: ['jquery'] } } }; 

And also adding the script

<script src="https://unpkg.com/jquery"></script> <script src="https://unpkg.com/[email protected]/survey.jquery.min.js"></script> 

Any help on getting this sorted out would be highly appreciated!

submitted by /u/stuli1989
[link] [comments]