0 votes
in SoSci Survey (English) by s292533 (125 points)
edited by SoSci Survey

Hello :-)

I’m currently designing an experiment and on one specific page of my questionnaire, participants can use the back button to return to the previous page.

I’m interested in tracking how many times participants click the back button on this particular page, i.e., how often they revisit the previous page for consultation.

Is there a predefined function in SoSci Survey, such as a Routemap or Page History, that can capture this data per participant?

Alternatively, would it be feasible to define an internal variable that counts how often this button is clicked for the relevant page?

I would appreciate any suggestions or insights on how to approach this!

Thank you in advance.

1 Answer

0 votes
by SoSci Survey (327k points)

I would recommend using an internal variable that counts every time the respondents come back to the page. Place this code on the respective page, exchange IV01_01 for the actual ID of your internal variable.

// Initialize the variable
if (value('IV01_01', 'code:ifany') == '') {
    put('IV01_01', 0);
}
// Count eventually
if (getRoute() == 'back') {
    $cnt = (int)value('IV01_01');
    put('IV01_01', $cnt + 1);
}
by s292533 (125 points)
with some adaptations it works


if (value('LE91_01', 'code:ifany') === '') {
    put('LE91_01', 0);
}
// Prüfe, ob der Zurück-Button gedrückt wurde
if (getRoute() == 'back') { // Setze 'ZurückTest' als die aktuelle Seite
    $cnt = (int)value('LE91_01');
    put('LE91_01', $cnt+1 );
}


important is that it only works if you put it in the page before the back button!!

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...