A custom variable template for the GTM Server container that performs basic mathematical operations between two input values. Including optional result rounding.
- Supports addition, subtraction, multiplication, and division
- Accepts numeric inputs or string representations of numbers
- Optional rounding to a configurable number of decimal places
- Select a math operation: Add, Subtract, Multiply, or Divide
- Enter two numeric input values
- Enable "Round result" to round the output
- Specify the number of decimal places to round to (defaults to
2
)
2 options:
- (Recommended) Add the variable to your GTM Server container from the GTM Template Gallery;
- or import the
template.tpl
file into your GTM Server container under Templates → Variables → New → 3 dots on the upper right corner → Import.
Initial development was done by Lars Friis.
The Math Variable for GTM Server Side is developed and maintained by Stape Team under the Apache 2.0 license.