- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Response time - delaying the onset of recording
- sheffieldthesismaps
- Topic Author
- Offline
- New Member
I'm using LimeSurvey to conduct a user study, part of which involves the use of some interactive web applications, for displaying 3D maps. These are embedded into limesurvey using an iframe. An example can be seen here: arcg.is/2mLRS5X
Participants must then answer some questions about the 3D map. I'm interested in response time, which LimeSurvey usefully records. However, the web application itself takes time to load and initiate - generally 30-40 seconds. As such, the response time recorded by lime survey is always in the region of 30-40 seconds out of step.
- Is there a way to delay the onset of the the response time measurement, until after the web application has fully loaded?
- Alternatively... the application records and displays the loading time, in the format "Data loaded in XX settings", when 'Details' is clicked on the loading screen. Might there be a way to extract the number of seconds here, and automatically subtract it from the response time for the question?
Any ideas? I guess this might be possible with javascript somehow, but I'm totally stuck!
Thanks!
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10611
- Thank you received: 3690
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11746
- Thank you received: 2750
I hope you are aware that not everyone might be able to access this application. Like me?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10611
- Thank you received: 3690
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11746
- Thank you received: 2750
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
At least you didn't had to wait 54 secholch wrote: I hope you are aware that not everyone might be able to access this application. Like me?
77ms: CE Web Viewer version: 5.1 [ 5.1.0.201702230534 | html:5.1.0.201702230534_ ]
88ms: GL detect: WebGL 1.0 More
4041ms: Loading webscene id : 6eaa9c2dfcab4bb0bb5276692e2f8f03
4054ms: Fallback to custom unzip on arraybuffer and custom streamParser
41597ms: Downloading: 100% (9.14 of 9.14 MB)
41598ms: Requested gzipped data, got gzipped data
41600ms: Using custom unzip and streamparser on arraybuffer
54015ms: Reading: 98% (9 of 9.14 MB)
54260ms: Data loaded in 51 seconds
54378ms: Initializing...
54384ms: Objects: 7, Materials: 7, Textures: 2, Geometries: 7, Layers: 6
54385ms: Web Scene version: 2.0 (Esri ArcScene (Build 4959))
Grabbing Date loaded in.. is differing from the real loading time.
I don't see any way to add custom Javascript into the ArcGIS-Viewer.
Since security is getting tighter in browser is there a way to have a listener, which scraps the frame for content? Is that possible with moderns browsers and tight security settings around iframe.
There are some hardware requirements for the graphic card and driver as well.
doc.arcgis.com/en/arcgis-online/referenc...427EA5D97A14BE32737A
So that might explain why Win10 and Chrome were not enough.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10611
- Thank you received: 3690
Not exactly but, as I mentioned, you can send a message from the iframe to the parent frame, even across different domains.Since security is getting tighter in browser is there a way to have a listener, which scraps the frame for content? Is that possible with moderns browsers and tight security settings around iframe.
My approach would be:
- load input-1 of a multiple-text question with a timestamp when the survey page loads
- have the iframe send a message when the application is completely loaded
- upon receipt of the message, input-2 of the multiple-text question is loaded with a new timestamp
Of course, the code to send the message would depend on the application in the iframe but the receiving code in the survey could look something like this:
<script type="text/javascript" charset="utf-8"> // Record a timestamp when page loads $(document).ready(function(){ $('#question{QID} input[type="text"]:eq(0)').val(new Date); }); // Function to run when message received function receiveMessage(event) { // Quit if message not from expected origin if (event.origin !== 'http://theIframeDomain.com') { return; } // It's a valid origin... else { // Verify the content of the received message if(event.data.indexOf('Some identifying string in data') < 0) { return; } else { // Record a second timestamp $(document).ready(function(){ var messageDate = event.data.replace(/Loaded time:/, ''); $('#question{QID} input[type="text"]:eq(1)').val(new Date); }); } } } // Message listener window.addEventListener("message", receiveMessage, false); </script>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11746
- Thank you received: 2750
Yes, you are right. Loading time was quite quick.jelo wrote:
At least you didn't had to wait 54 secholch wrote: I hope you are aware that not everyone might be able to access this application. Like me?
There are some hardware requirements for the graphic card and driver as well.
doc.arcgis.com/en/arcgis-online/referenc...427EA5D97A14BE32737A
So that might explain why Win10 and Chrome were not enough.
Yeah, my notebook obviously doesn't have the required graphic card. But given that most people out there use notebooks and therefore mostly will depend on the shared Intel graphic card options, may will not be able to access this content.
This might be totally OK, because sheffieldthesismaps's target group might have the required hardware, but I thought I'd mention it, before he is running into the problem later. Not really LImesurvey related, though.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- sheffieldthesismaps
- Topic Author
- Offline
- New Member
- Posts: 3
- Thank you received: 0
I'm going to play around with the Javascript today – thanks tpartner for the beginnings – and see if I can get something working.
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
Thanks for showing your approach. To me it looks like the step with the iframe is not allowed by arcgis viewer (Can be wrong). So my question was, if you are technically allowed to keep looking via JS for changing content in that iframe from outside.tpartner wrote: - have the iframe send a message when the application is completely loaded
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- sheffieldthesismaps
- Topic Author
- Offline
- New Member
- Posts: 3
- Thank you received: 0
tpartner wrote: My approach would be:
- load input-1 of a multiple-text question with a timestamp when the survey page loads
- have the iframe send a message when the application is completely loaded
- upon receipt of the message, input-2 of the multiple-text question is loaded with a new timestamp
I'm also a bit confused by what you're referring to with 'multiple-text' question. Do you mean a multiple short-text question? Ideally I need to use a List (radio) type question in this scenario. Would that theoretically still work with this solution, provided the arcgis issues mentioned by jelo could be overcome?
Another potential solution I thought of, is to hide all content for 60 seconds with a secondary 'loading screen'', and then just subtract 60 seconds from the recorded response time. Perhaps an easier/more workable solution?
So, I can delay the loading of the content for 60 seconds using this:
<style type="text/css">.arcapp { display:none;}
</style>
<div class="arcapp">
<h2>3D App goes here</h2>
</div>
<script type = "text/javascript">
$(document).ready(function() {
$(".arcapp").delay(60000).fadeIn(500);
});
</script>
Is there an simple way to delay timing for 60 seconds, or to subtract 60 seconds within lime survey, instead of doing it later/manually in excel/spss, when I analyse the data?
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
sheffieldthesismaps wrote: Do you mean a multiple short-text question?
Tpartner is not talking about your question you want to ask. The javascropt has to save the timestamp somewhere (textfield).
What about users which are not seeing the ArcGIS viewer after 60 seconds? Cause the loading took longer? Environment of every respondent can differ too much to interpret duration in a coherent way.sheffieldthesismaps wrote: Another potential solution I thought of, is to hide all content for 60 seconds with a secondary 'loading screen'', and then just subtract 60 seconds from the recorded response time. Perhaps an easier/more workable solution?
It's ain't getting simpler then doing a SPSS subtraction.sheffieldthesismaps wrote: Is there an simple way to delay timing for 60 seconds, or to subtract 60 seconds within lime survey, instead of doing it later/manually in excel/spss, when I analyse the data?
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users