labvanced logoLabVanced
  • Research
    • Publications
    • Researcher Interviews
    • Use Cases
      • Developmental Psychology
      • Linguistics
      • Clinical & Digital Health
      • Educational Psychology
      • Cognitive & Neuro
      • Social & Personality
      • Arts Research
      • Sports & Movement
      • Marketing & Consumer Behavior
      • Economics
      • HCI / UX
      • Commercial / Industry Use
    • Labvanced Blog
    • Services
  • Technology
    • Feature Overview
    • Code-Free Study Building
    • Eye Tracking
    • Mouse Tracking
    • Generative AI Integration
    • Multi User Studies
    • More ...
      • Reaction Time/Precise Timing
      • Text Transcription
      • Heart Rate Detection (rPPG)
      • Emotion Detection
      • Questionnaires/Surveys
      • Experimental Control
      • Data Privacy & Security
      • Desktop App
      • Mobile App
  • Learn
    • Guide
    • Videos
    • Walkthroughs
    • FAQ
    • Release Notes
    • Documents
    • Classroom
  • Experiments
    • Cognitive Tests
    • Sample Studies
    • Public Experiment Library
  • Pricing
    • Licenses
    • Top-Up Recordings
    • Subject Recruitment
    • Study Building
    • Dedicated Support
    • Checkout
  • About
    • About Us
    • Contact
    • Downloads
    • Careers
    • Impressum
    • Disclaimer
    • Privacy & Security
    • Terms & Conditions
    • Third-Party Licenses
  • Appgo to app icon
  • Logingo to app icon
Learn
Guide
Videos
Walkthroughs
FAQ
Newsletter Archive
Documents
Classroom
  • 中國人
  • Deutsch
  • Français
  • Español
  • English
  • 日本語
Guide
Videos
Walkthroughs
FAQ
Newsletter Archive
Documents
Classroom
  • 中國人
  • Deutsch
  • Français
  • Español
  • English
  • 日本語
  • Guide
    • GETTING STARTED

      • Task Editor
      • Stimulus Presentation
      • Correctness of Response
      • Objects
      • Events
      • Variables
      • Task Wizard
      • Trial System
      • Study Design
        • Tasks
        • Blocks
        • Sessions
        • Groups
    • FEATURED TOPICS

      • Experiment Design
        • Creating a Study
        • Data Frame Patterns
      • Randomization & Balance
      • Eye Tracking
        • Presenting Stimuli in an Eye Tracking Task
        • How to Choose Eye Tracking Calibration Settings
        • Setting Up Eye Tracking in a Task
        • Recording and Exporting Gaze Data
        • Using Shapes as Areas of Interest (AOI) for Eye Tracking
        • The Participant Calibration Experience
      • Web Bridge
      • Questionnaires
      • Desktop App
      • Sample Studies
      • Participant Recruitment
      • API Access
        • REST API
        • Webhook API
        • WebSocket API
      • Other Topics

        • Precise Stimulus Timings
        • Multi User Studies
        • Head Tracking in Labvanced | Guide
    • MAIN APP TABS

      • Overview: Main Tabs
      • Dashboard
      • My Studies
      • Shared Studies
      • My Files
      • Experiment Library
      • My Account
      • License & Services
    • STUDY TABS

      • Overview: Study-Specific Tabs
      • Study Design
        • Tasks
        • Blocks
        • Sessions
        • Groups
      • Task Editor
        • Task Controls
        • The Trial System
        • Canvas and Page Frames
        • Objects
        • Object Property Tables
        • Variables
        • System Variables Tables
        • The Event System
        • Text Editor Functions
        • Eye Tracking Options in the Task Editor
        • Head Tracking in a Task
        • Multi-User Studies
      • Settings
      • Variables
      • Media
      • Texts & Translate
      • Launch & Participate
      • Subject Management
      • Dataview and Export
        • Dataview and Variable & Task Selection (OLD Version)
        • Accessing Recordings (OLD Version)
  • Videos
    • Video Overview
    • Getting Started in Labvanced
    • Creating Tasks
    • Element Videos
    • Events & Variables
    • Advanced Topics
  • Walkthroughs
    • Introduction
    • Stroop Task
    • Lexical Decision Task
    • Posner Gaze Cueing Task
    • Change Blindness Flicker Paradigm
    • Eye-tracking Sample Study
    • Infant Eye-tracking Study
    • Attentional Capture Study with Mouse Tracking
    • Rapid Serial Visual Presentation
    • ChatGPT Study
    • Eye Tracking Demo: SVGs as AOIs
    • Multi-User Demo: Show Subjects' Cursors
    • Gamepad / Joystick Controller- Basic Set Up
    • Desktop App Study with EEG Integration
    • Between-subjects Group Balancing and Variable Setup
    • Website Frame Eye Tracking Walkthrough
    • Conditional Webcam Eye Tracking
  • FAQ
    • Features
    • Support Policy & Guidelines
    • Security & Data Privacy
    • Licensing
    • Precision of Labvanced
    • Programmatic Use & API
    • Using Labvanced Offline
    • Troubleshooting
    • Study Creation Questions
  • Newsletter Archive
  • Documents
  • Classroom

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:

  1. Your main study, with the study-level Eye-Tracking toggle enabled.
  2. A duplicate of it, identical except the toggle is off, for participants who shouldn't see the camera prompt at all.
  3. 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.

  1. Build and finish your main study. Iterate and test it fully with the study-level Eye-Tracking toggle enabled.
  2. Once it's finished, duplicate it. From the My Studies list, select the study and click Copy in the side menu. In the copy, go to Settings tab → Physiology and uncheck Eye-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).
    • If the variable equals one value → Then: Jump Actions → Redirect to URL, with the webcam-enabled study's link (must start with https://).
    • Add Else-If Case for the other value → Then: another Redirect to URL action, 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.

Prev
Website Frame Eye Tracking Walkthrough