Metrics

Learn how to update and add new calculated metrics to your report.

You can create new calculated metrics using TiKiLa - the Tiny Kitchn Language - which supports formulas and calculations similar to a spreadsheet, or a basic programming language.

The most common calculation will be dividing two values, e.g. Spend and Leads to get the CPL metric.

TiKiLa always needs to be wrapped in two curly brackets {{ and }} and will suggest auto-completion for formulas when you start typing.

Notion image

While there exists a simple divide() function, it is usually recommended to use the divideOrZero function to handle cases where the dividend is 0.

{{
	divideOrZero(
		inputData('/spend'),
		inputData('/actions_lead'),
	)
}}

The other core mathematical formulas are subtract(), add() and multiply().

In order to use existing values or other custom metrics, we have to use the inputData() keyword and the pointer logic that starts with a forward slash / and uses the value’s or metric’s identifier.

 

 
 
 
 
 
Did this answer your question?
😞
😐
🤩

Last updated on March 25, 2024