Skip to main content
How can I insert calculations?

Create automated calculations based on given answers

Luise avatar
Written by Luise
Updated over 5 months ago

Personalise your sales process and offer your leads added value by automatically calculating individual offers, quiz results and much more based on the answers given.

The HTML block allows you to integrate customised elements or applications within your funnels. For example, calculations/calculations based on given answers.

💡 This feature is currently only available for Advanced Plan users. Click here for more information about our plans.

Which variables can I use?

To be able to perform a calculation, you must first query the variables on which the calculation is based in your funnel.


User-defined form fields are particularly suitable for most calculations.
To do this...

  • create a form block,

  • add a user-defined field,

  • customise it according to your wishes

  • and enter a unique Tracking ID

💡In addition to user-defined form fields, you can also use other variables from your funnel for your calculations & use them in your HTML code if required.

How can I add calculations?

To add calculations/calculations via the HTML block, you must first add an HTML block to your funnel:

  1. click on a layout in your funnel

  2. click on the small blue ‘+’ to insert a new block

  3. select the ‘HTML’ block

  4. click on the HTML icon to edit the embed code

  5. insert your embed code with the desired calculations

💡 At this point you can now insert the previously requested variables. A variable always starts & ends with two curly brackets: {{variable}}

Matching the example field above: {{visitor_height}}

Complete code example (BMI Calculator):

<div style="padding: 16px; text-align: center; font-family: sans-serif;">
<h1>BMI Calculator</h1>

<p>Your Age: <span id="age">{{visitor_age}}</span></p>
<p>Your Weight (kg): <span id="weight">{{visitor_weight}}</span></p>
<p>Your Height (cm): <span id="height">{{visitor_height}}</span></p>

<p style="font-weight: bold; margin-top: 64px; font-size: 32px;">Your BMI = <span id="bmi"></span></p>

<script>
// Parse string variables to numbers
const age = parseInt(document.getElementById('age').textContent);
const weight = parseFloat(document.getElementById('weight').textContent.replace(',', '.'));
const height = parseInt(document.getElementById('height').textContent);

// Calculate BMI
const bmi = weight / (height / 100) ** 2;

// Display BMI value
document.getElementById('bmi').textContent = bmi.toFixed(2);
</script>
</div>

6. you've done it! As soon as you have inserted your HTML code, you will see your embed on the right in the preview


Find additional information on the following topics in our Help Center:

Did this answer your question?