Hi all,I have a survey where I've implemented a simple counter to track the number of times a user clicks on any region of a Hot Spot element. I've set up a click event listener for the path elements of the hot spot SVG, and on click, I get the embedded data field hs_ct, increment by one, then set hs_ct with the updated value. Here's a simple example: https://betterup.co1.qualtrics.com/jfe/form/SV_cTIkLpl3p9HHZtkAnd here's the JS code for the hot spot item:Qualtrics.SurveyEngine.addOnload(function(){ /*Place your JavaScript here to run when the page loads*/});Qualtrics.SurveyEngine.addOnReady(function(){ jQuery('path').on('click', function() { console.log('you clicked a region'); var ct = parseInt(Qualtrics.SurveyEngine.getEmbeddedData("hs_ct")); console.log('counter before increment: ' + String(ct)); ct = ct + 1; console.log('counter incremented by 1: ' + String(ct)); Qualtrics.SurveyEngine.setEmbeddedData("hs_ct", ct); var newCt = Qualtrics.Su
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.