Conditional Webcam Eye Tracking: Splitting Participants Before the Camera Prompt
Some studies need to send only some participants into a webcam eye tracking flow, with everyone else routed to a non-webcam version, before any camera-access prompt ever appears. There are two ways to do the split, depending on whether your recruitment source can already do it for you.
Option A: Split at Recruitment
If you're recruiting through an external platform or panel, the simplest option is to split there instead of inside Labvanced: post or send out both study links as if they were two separate studies, the webcam-enabled study's link to one portion of your target sample, the non-webcam copy's link to the rest, the same way you'd normally distribute one study link, just doubled. Whichever link a given participant receives is what decides their branch, with nothing to build in Labvanced beyond the two studies themselves. No router study, redirect event, or branching variable needed.
Use this whenever your recruitment setup allows it. Option B below is for when it doesn't, for example a single recruitment link or pool that can't be pre-split this way, or a decision that has to be made inside the study itself.
Option B: Split Inside Labvanced
This path builds three studies and lets an event inside Labvanced decide which one a participant ends up in.
Why Three Studies
Whether Labvanced requests camera access at all is controlled by a single, study-level Eye-Tracking toggle (Settings tab → Physiology → Eye-Tracking), and it fires once, at study startup, before any task or event runs. See Setting Up Eye Tracking in a Task for the full mechanism. Because that toggle applies to the whole study and is checked before any of your own events can run, there is no way to suppress the prompt for some participants and not others from inside a single study. This pattern uses three studies to work around that:
- Your main study, with the study-level
Eye-Trackingtoggle enabled. - A duplicate of it, identical except the toggle is off, for participants who shouldn't see the camera prompt at all.
- A small router study, also with eye tracking off, whose only job is to decide which of the two links a participant goes to, then redirect them there.
Workflow Tip: Duplicate Last
Build and fully finish your main study first, stimuli, events, everything, before you create the duplicate. If you duplicate early and keep iterating, every change from that point on (a new stimulus, a fixed event, an edited variable) has to be made twice, once in each copy, since they become fully independent studies the instant you duplicate. Only duplicate once the study is finished and tested.
- Build and finish your main study. Iterate and test it fully with the study-level
Eye-Trackingtoggle enabled. - Once it's finished, duplicate it. From the
My Studieslist, select the study and clickCopyin the side menu. In the copy, go toSettingstab →Physiologyand uncheckEye-Tracking. You now have two otherwise-identical study links, one with webcam eye tracking on, one without.
Branching on a Variable's Value
In the router study, add an event that checks whatever variable holds the branching decision and redirects accordingly:
- Trigger:
Variable Value Changed Trigger→Variable (Value Changed), watching that variable. - Action:
Control Actions→Requirement Actions (If... Then... Else If).Ifthe variable equals one value →Then:Jump Actions→Redirect to URL, with the webcam-enabled study's link (must start withhttps://).Add Else-If Casefor the other value →Then: anotherRedirect to URLaction, pointing at the non-webcam copy's link instead.
What feeds that variable depends on where the decision should come from:
Task performance or outcome. If the branch should depend on how the participant performed on an earlier task rather than anything they explicitly answered, for example a comprehension check, a practice-block accuracy score, or a reaction-time threshold, have that task end with a Set / Record Variable action that stores the outcome, then check that variable's value in the router event instead of a consent answer. In this case the router study isn't just the minimal redirect logic, it also contains whatever task produces the performance signal.
A participant's own answer. Add a Multiple Choice object to the router study with a question like "Do you agree to enable your webcam for eye tracking during this study?" and two options, Yes and No. This writes the participant's answer to a linked variable, which the event above checks.
Automatic group assignment. If the split should happen without asking the participant anything, use balanced random group assignment instead, the same factor-variable mechanism covered in Between-subjects Group Balancing and Variable Setup (Scenario 2). Each participant is assigned one value of the factor variable, balanced across subjects, and the event above checks that value instead of a consent answer.
Testing Your Branches
Test every branch yourself before publishing. Confirm the webcam-enabled path reaches the correct study and triggers its camera prompt, and the non-webcam path reaches the other copy and never does.
Further Reading
Setting Up Eye Tracking in a Task
The study-level vs. task-level Eye-Tracking toggle this pattern depends on.
Multiple Choice Object
Full reference for the object used to record a participant's consent answer.
Website Frame Eye Tracking Walkthrough
Tracking gaze on a real external website instead of stimuli built in Labvanced? Start here.