---
title: "The Tag Expression Editor"
canonical: "https://docs.rubiconwater.com/space/DC/2048753819/The%20Tag%20Expression%20Editor"
format: markdown
---
> Macro (toc)

The Tag Expression Editor is a graphical user interface that helps you to build a tag expression. 

# How are Tag Expressions Evaluated?

Each tag expression consists of one or more tag expression statements. The statements will be evaluated until a value is returned after which evaluation will stop. 

# Opening the Tag Expression Editor

1. Open the Tag Details screen for the tag whose value you want to calculate. You can do this from the Site Tags module or the Data Sources module.
2. Open the Tag Expression tab and click **Edit** (if necessary) to start editing the tag expression.
  - Click **Add** to add a new row. The new row will be added at the end of the tag expression.
  - Click **Delete** to remove the selected row.
  - Click **Edit** to edit the selected row.
3. When you have finished, click **Save** to save your changes. The tag will now be highlighted in yellow on the table.

![image](media://50d62515-4822-4965-aa3a-a217014a641d)

*Tag Expression Editor*

# Types of Tag Expression

There are three types of tag expression row that you can build with the Expression Editor. Select the type that you want to build by using the radio buttons at the top of the screen.

1. **Calculation** - these expressions calculate or look up two values, then combine them arithmetically.
2. **Condition** - these expressions perform a test and return a value depending on the result of the test.
  - The values that are compared in the test can be either constants, or the results of calculations from different rows
  - The values that are returned must be the results of calculations from different rows (in future versions of the software you will be able to return constant values).
3. **Value** - these expressions calculate or look up a single value.

---