How to track the overall time on page and auto-advance after that time | XM Community
Skip to main content
I have several questions on the one page, asking for correct answers. So I set the correct answers as the question validation. But I also want to implement auto-advance to proceed when it reaches the time limit, in case any respondent cannot figure out all the answers within the time limit. I also added one validation condition as Timing-Page submit time greater than a certain amount of time. But now the timing format is set as the time after clicks, rather than the overall time on page, which leads to the time on page being recalculated whenever the respondent wants to proceed to the next page but with wrong answers to any of the questions. Is there any way to calculate the overall time on page, rather than time after clicks, and allow the page to auto-advance after this time?
I believe this is what is happening... When you use validation the page gets submitted to the server, then reloads with the validation error if the validation fails. Each time it reloads the timer question restarts.



To get around this, I think you can put this page in its own block and use embedded data to calculate the time spent on the page. Survey flow would be:

```

start = ${e://Field/Q_TotalDuration}

Question Block

pageTime = $e{ e://Field/Q_TotalDuration - e://Field/start }

```
How does this influence the function of auto-advance? I don't need to calculate the entire time the respondents spend on the page, I need the page to proceed after a certain amount of time. This still does not allow the question block to advance.



> @TomG said:

> I believe this is what is happening... When you use validation the page gets submitted to the server, then reloads with the validation error if the validation fails. Each time it reloads the timer question restarts.

>

> To get around this, I think you can put this page in its own block and use embedded data to calculate the time spent on the page. Survey flow would be:

> ```

> start = ${e://Field/Q_TotalDuration}

> Question Block

> pageTime = $e{ e://Field/Q_TotalDuration - e://Field/start }

> ```

>
> @LiGuan said:

> How does this influence the function of auto-advance? I don't need to calculate the entire time the respondents spend on the page, I need the page to proceed after a certain amount of time. This still does not allow the question block to advance.

Auto-advance and validation aren't compatible because respondents won't be able to advance until the validation condition is met. So, you could write your own JS auto-advance script and pipe in the start time and use it in your auto advance logic, but if you did that the respondents will get stuck in an endless loop. A potential solution to that problem is in this thread: https://www.qualtrics.com/community/discussion/comment/4449#Comment_4449

Leave a Reply