How can I integrate a JS library that saves the data for each question?

More
5 months 2 weeks ago #218616 by Antoalree_281242
Hello everybody, 
I need to understand how I can integrate/activate a JS library into a template; more precisely what I need is that, after making the library work, I can save the data obtained from the library for each question separately.
For example, if I am using a library that saves eye-tracking data and I have 10 questions in the survey, what I'd like to do is save for each question the data telling me where the person that took the survey looked during that question and be able to look at it afterwards. I am struggling because I don't know how to do that... I don't know if I explained good enough (english is not my native language, sorry).
I think that only editing the survey theme and putting the library as a script in the source isn't enough, I may have to edit the question theme separately but right now Lime Survey doesn't allow you to edit the question themes, so what could I do? Download LS from the website and edit the question theme, but then how can I make it possible that someone else could use the integration I made?
I am a bit lost, I don't know how to proceed in general. Thanks in advance to everyone that will answer. 
 

Please Log in to join the conversation.

More
5 months 2 weeks ago #218621 by DenisChenu
It's not a JS library here : you need a way to save data.

Then : it's a complete plugin system in my opinion.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
5 months 2 weeks ago - 5 months 2 weeks ago #218626 by Antoalree_281242
I didn't understand what you said.
Btw yes, I have to make a plug-in but I don't know how to proceed.
Last edit: 5 months 2 weeks ago by Antoalree_281242.

Please Log in to join the conversation.

More
5 months 2 weeks ago #218629 by tpartner

It's not a JS library here : you need a way to save data.
Then : it's a complete plugin system in my opinion.

Most JS libraries have events when data is collected. You should be able record the data in the LS inputs when those events are triggered. Details would depend on the API of the library.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 months 2 weeks ago #218634 by DenisChenu

It's not a JS library here : you need a way to save data.
Then : it's a complete plugin system in my opinion.Most JS libraries have events when data is collected. You should be able record the data in the LS inputs when those events are triggered. Details would depend on the API of the library.

test ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
5 months 2 weeks ago #218635 by DenisChenu

It's not a JS library here : you need a way to save data.

Then : it's a complete plugin system in my opinion.Most JS libraries have events when data is collected. You should be able record the data in the LS inputs when those events are triggered. Details would depend on the API of the library.

Yes : but then : need to create a input on each group to fill the json. Seems complex except if it's a one shot.

> Btw yes, I have to make a plug-in but I don't know how to proceed.

Samples : github.com/LimeSurvey/LimeSurvey/tree/ma...ication/core/plugins + gitlab.com/SondagesPro + manual.limesurvey.org/Available_third_party_plugins

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
5 months 2 weeks ago #218637 by Antoalree_281242
I am sorry but I'm really not understanding what you're telling me, could you explain it again?

Please Log in to join the conversation.

More
5 months 2 weeks ago #218638 by Antoalree_281242
Again, I'm having troubles understanding what you're telling me. Could you explain to me what you're saying?

Please Log in to join the conversation.

More
5 months 2 weeks ago #218675 by holch

Again, I'm having troubles understanding what you're telling me. Could you explain to me what you're saying?

Then I don't think you'll be able to implement the solution by yourself anyway, you will need to find someone who understands these explanations.

What Tpartner suggests is have the javascript library to write the collected data from your eye-tracking into a hidden limesurvey question (e.g. a text question that you hide via CSS - NOT via the GUI option "always hide this question").

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

More
5 months 2 weeks ago #218676 by holch
Oh, I just saw that the user is blocked. What happened?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

More
5 months 2 weeks ago #218688 by killmeplease
Sorry, it was me. I realized I explained my problem really bad and I couldn't find a way to delete the post (so that I could re-write it) so I just.. deleted the account(?)
But the post is still there for some reason :<
Anyway you already answered me on the other post I made about this (forums.limesurvey.org/forum/development/...ed-from-a-js-library) so thank you here too.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now