Question on timed tests

athanie
athanie Community Member Posts: 18
You'll need a series of actions and variables to do this, but it's possible...For starters, you can easily track how many times a page is visited by creating a variable x_pagevisit. Populate that variable with an Action at the Page Level: OnShow, Mod Variable x_pagevisit, 1, Add to Variable. Each time the user goes to the page, the count increases by one.The timing is a bit trickier. Create 3 variables: x_starttime, x_time, and x_totaltime. Set an action at the page level: OnShow, Mod Variable x_starttime, VAR(elapsedtime), Set Variable. This will record the starting point. Add another variable to the Next/Back page buttons: OnClick, Mod Variable x_time, VAR(elapsedtime), Set Variable. This will record the exit time. Now the math...A second action on the Next/Back page buttons: OnClick, Mod Variable x_time, VAR(x_starttime), Subtract. This result is the time spent on the page for that given visit. Add a third action to the Next/Back buttons: OnClick, Mod Variable x_totaltime, VAR(x_time), Add to Variable. This will provide a running tally of how much time has been spent on the page overall - despite the number of visits.