Quantcast
Channel: Topics in Category: Can I do this with LimeSurvey? - LimeSurvey forums
Viewing all articles
Browse latest Browse all 17529

click tracking with limesurvey - by: tpartner

$
0
0
Maybe answered...but...

If you would simply like to record the number of clicks in the data, you can use JavaScript to detect clicks on an element and increment the value of a text or numeric input.

For example, if using the latest LS version with the default template, setting up your survey to use JavaScript and adding the following script to to the source of a numeric question will increment its value every time an image in the question text is clicked.

<script type="text/javascript" charset="utf-8">
	$(document).ready(function(){
		$('#question{QID} .question-text img').on('click', function(i) {
			$('#question{QID} input[type="text"]:first').val(Number($('#question{QID} input[type="text"]:first').val())+1);
		});
	});
</script>

Viewing all articles
Browse latest Browse all 17529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>