The server side has the capability to calculate and return values as you need them, just like the Frontend Variables. The difference is the runtime, as all the Backend Variables are calculated on the server and thus don’t access the actual environment on a users browser. Instead the Backend Variables access values that are submitted in the Jentis Data Model (Document Objects). Here you can create functions to address complex logic that you need to apply to values to meet certain syntax criteria or serve a business case.

Backend Variable Creation Process

To create a Backend Variable navigate in your JTM account to Data Sources area and select “Backend Variables”. Here you can add new Backend Variables or adjust existing ones.

The properties of a Backend Variable are:

  • Name: This is the value that will appear in the selection in a Tag configuration, here you should use a descriptive name.

  • ID: This is a technical reference that can be used to reference a trigger explicitly as this ID is unique per JTM account.

  • Description: Feel free to give a Backend Variable a description.

  • Code: Here you need to add the function to return a value. More details in the following section.

Use Cases for Backend Variables

Backend Variables can access all the details of the server side environment, including the local storage on the virtual machine or any value that is submitted frontend to your Jentis server. Here are some use cases to make the use of Backend Variables more clear.

Access Document Object Properties

With the following Backend Variable you can access an events property, check the value and return a result based on it.

$body
CODE