Calculating and exporting eye tracking metrics in Tobii Pro Lab

Tobii Pro Lab Screen based projects Glasses projects

Learn how to calculate and export AOI and event based metrics in Pro Lab

A key factor in setting up a successful eye tracking study is to be able to define and calculate the appropriate measures for your research question. Aside from choosing the right eye tracking measure, this process includes defining where and when to calculate this measure, i.e. the Areas of Interest that are associated to operationalization of your research question and Times of Interest, the intervals of the recording when your stimulus or behavior of interest are predicted to occur. Examples of intervals can be, the duration of the exposure of an image on the screen, a section of a trial, the time between when an image appears on the screen and when a participant presses a key on the keyboard, the moment someone enters a supermarket aisle and places a product in the shopping basket, etc.

In Pro Lab, the term "metric" is used to define the different measures that can be calculate from the recording data. These measures can be exported in different table/file formats that can either be used to get an overview of the data and extract summary statistics, or to organize the data for further processing in statistical software platforms such as R or SPSS.

For best practice, and unless your study is of an explorative nature, measures should be defined during the planning and design phase of the study. This will help you to evaluate and choose the right tools in the software, and consequently be able to estimate how much time and resources you will need to invest in the analysis phase. For example, if a specific measure is not part of the metrics output of your analysis software, you will most likely still be able to calculate it by exporting the underlying recording data, and process it with the help of external software (e.g. Excel, or Matlab). This will however require more time and knowledge of scripting.

Pro Lab calculates metrics using the following recording data:

  • eye movement states and events (e.g. fixation and saccade metrics)
  • participant actions (e.g. keypress, mouse clicks) 
  • stimuli (media) and snapshot events (e.g. media start and stop times) 
  • manually logged events (e.g. participant behavior and situational) 
  • co-registered signal states and events (e.g. galvanic skin response metrics, sync events) 

This data can be further aggregated by selecting and exporting:

In Pro Lab the metrics can be calculated and exported using the Metrics Tool.

Try out calculating and exporting eye tracking metrics in Pro Lab

When using Pro Lab to calculate and export eye tracking measures, it is best to start by defining what would you like to do with your metrics export. Do you have to prepare a report with some basic descriptive statistics? Or would you like to perform a statistical analysis on your data? In this example we will look at the second case and show you how to export data in an experiment containing trials.  

Let’s imagine that you are a researcher studying patients with depression. After reading the relevant literature, you come up with an initial research hypothesis that depressed individuals show a bias for negative emotion information compared to non-depressed individuals and decide to test this hypothesis using eye tracking. Your first step is to think of a design and operationalization of this initial hypothesis that works with the information extracted from eye tracking data, i.e. how can you study a bias towards emotion information looking at the visual behavior of your subjects. Luckily, you won’t have to re-invent the wheel, in the literature you reviewed there was a paradigm that seem suited to study attentional biases.  

In this paradigm, a trial consists of a fixation cross image followed by an image containing two items. During the recording, the subjects are told to fixate on the cross and then to view the next image (free viewing). There are several versions of this image to balance for side-bias effects, and account for the possible combinations of the different items, so each recording will contain multiple trials. The measurements used in this paradigm are 1) the initial orienting response towards the items and 2) the difficulty in disengaging attention from one item and reallocating it toward the other one that it is paired with.

Trial structure

Figure 1. Shows the trial structure of the attentional bias test. Each trial is composed of two elements: an image with a fixation cross in the center followed by a second image with two faces.  In each trial the important interval where we want to measure participant behavior is when the image with the two faces are presented to the participant.


In your study, the items that the subjects will gather information from, are images of faces expressing happy, angry and neutral emotions. These items will be combined in pairs on a single image, and each combination will be included as a separate trial. Among the different metrics available in Pro Lab, “Time to First Fixation” and “Fixation Duration - Total” are used to quantify the initial orienting response towards the face, and difficulty of disengagement with the face, respectively. Thus, depressed individuals should show significant lower Time to First Fixation and larger Fixation Duration to angry faces, when compared to the other two facial expressions. On each image the Areas of Interest (AOIs) consist of two rectangles covering each face. Add an AOI tag – Angry, Happy and Neutral – to each AOI according to the facial expression. This will allow you to aggregate the data from all AOIs containing the same facial expression during the analysis. Meanwhile create a participant variable entitled “ClinicalDx” with two values “Depressed” and “Normal”. Then run your preliminary data collection. At the start of each recording the participant value was added todata, according to the subject's clinical diagnosis.

Let’s summarize the key steps you need to do to prepare your data for the export:

  1. Draw AOIs on the relevant items in the stimulus
  2. Create AOI tags for each AOIs. These tags represent different items that occur in multiple trials
  3. Record your data and create the participant variables.
  4. Create Trial start and stop events and Trial TOIs if the interval that you want to extract metrics from spans over more than a single media element in your trial structure. If this is not the case, skip this step and use the Media gaze data TOIs that are automaticaly created during a Pro Lab recording.

Finally, you are ready to perform the data export:

  1. Open the Metrics tool by clicking on the “Metrics” button - either in the Project Overview section or select it form the Analyze dropdown menu in the top navigation.
  2. On the Settings panel to the right, locate the Export format drop-down menu, choose the “Interval based (.tsv)” format. 
  3. Next, select the Pro Lab metrics, by first, deselecting all metrics by clicking on the tick-box on the upper-left corner of the “Select metrics for the export…”, then click on the respective tick-boxes to select “Fixation Duration - Total” and “Time to First Fixation”. 
  4. Leave the Tobii I-VT (Fixation) as the selected Gaze Filter. 
  5. On the Data selection panel, select all recordings, and the participant variable “ClinicalDx”, which tells you which participants belong to the clinically depressed and normal groups. I want to make sure this data is included in my export file. 
  6. On the Time of Interest list and under “Media gaze data” select the images containing the faces and deselect all other media. Each image in each recording will correspond to the section of the trial that contains the relevant visual behavior we want to measure. 
  7. Then unselect the “Recording gaze data”. Finally, under the Tags list select your tags – Happy, Angry and Neutral.
  8. Click the Export button on the top right of the interface.
  9.  In the file browser that opens, locate the folder where you want to save the file. 
  10. In the File name field, enter a file name for your export. 
  11. Click Save.

You can now import the exported file into Excel, R or SPSS. Let’s open the file in Excel to look at the file structure.

  1. Open Excel and open a blank workbook
  2. Import your .tsv file into Excel – click on the Data tab, then click Get Data > From File > From Text/CSV. 
  3. On the Import Data window select All Files from the file dropdown menu, select and locate your .tsv file, then click Import. The file imported into Excel should look like the one in the image below, where each row of the table represents a trial (i.e. the row data represents the TOI, in this case the Media). The file also contains the participant variables (ClinicalDx) associated to each participant, and the metrics that were chosen for the export for each of the AOI tags that were created (Angry, Happy and Neutral).  
Export file


  • Working with dynamic stimuli in the AOI tool

    Learn more about and get some tips on how to work with AOIs on moving stimuli like movies or animations in Tobii Pro Lab and Tobii Pro Studio.

    Tobii Pro Studio Tobii Pro Lab Areas of Interest
  • Digging into intervals and Times of Interest

    Learn how to use Times of Interest to segment your data into meaningful periods of data analysis.

    Tobii Pro Lab Screen based projects Glasses projects
  • Manual and Assisted Mapping

    Learn how to automatically map and aggregate data from eye tracking videos onto snapshots. 

    Tobii Pro Lab Glasses projects Scene camera projects