Variables
Variables are used in the experience to control the various activities of elements and scenes through rules. But these variables are local and cannot be used for different experiences of the same organization.
Adding Variables in an experience
- Choose the variables you want to add.
- Add the variable by clicking on
Add Variable Button
in the variables tab.
Variables can also be tracked by enabling the "track" option for each variable. The information about this can then be viewed in analytics.
Global Variables
Global Variables remain same for the entire organization's different experiences.
Defining Global Variables
- Click on
Define Global Variables
in the Variables tab.
- Add the global variables by clicking on
Add Variable
button.
Adding Global Variables in the experience
- Choose the variables you want to add.
- Click on
Add Global Variables
button in the Variables Tab.
Using Global Variables in an experience
- Add Global Variables to your experience by referring to Adding Global Variables.
- Add a TextBox by clicking on the
+
icon. - Put the Global Variable you want to use in the text in double curly brackets: {{GLOBAL_VAR}}.
- Add a Rule: Change the value of {{GLOBAL_VAR}} to (let say "Global variables") after clicking on any element.
- Deploy the experience using authentication as non-public.
To check persistance of Global Variables
After performing the above steps, do the steps as follows:
- Create a new experience and add the Global Variable (GLOBAL_VAR) to that Experience.
- Add a TextBox by clicking on the
+
icon. - Put the Global Variable you want to use in the text in double curly brackets: {{GLOBAL_VAR}}.
After deploying the experience, it will be noticed that the GLOBAL_VAR contains the new value ("Global Variables") and not the value with which the GLOBAL_VAR was initialized.
Auto-generated Variables
Some variables are generated automatically when you create an experience. You may choose to retain or remove some of these variables. These variables are immutable and cannot be changed in value.
Types of auto-generated variables
v_identifier_var
- A unique ID to identify each viewer who views the experience. This is generated to track the behaviour of the viewer throughout the experience. This can be viewed in the analytics page.
Tracking is be enabled on this variable to show results in analytics page. It can be turned off if required.v_platform
- This variable holds the platform information for a device. Possible values ared
-> Desktopm
-> Mobile
viewer_info_col1
,viewer_info_col2
,viewer_info_col3
- These variables are enabled when the Viewer Form option is enabled from the settings section inside the editor. To enable this:- Go to the Splash Screen inside the settings tab in your experience.
- Enable the feature
Capture user info
. - In the
User Info
tab inside Splash Screen, you can now add up to 3 fields for this form.
The infomation stored inside these three variables are available for each individual viewer.
score
- This score variable can be added to the experience by adding a score element.There can be only one score variable in an experience and the score is always a number.lang
- The lang variable can be added to the experience by enabling theShow Language Screen
option in the settings section. To add languages, go to theLanguages
tab inside Splash Screen. This variable will hold the value of the language selected by the viewer.media_upload_uri
- This variable can be added to the experince by adding a Media Upload element. This element holds the full url of the image uploaded by the viewer. The information held by this variable can be seen under Views section in the analytics page.browser_var
- This variable holds the information on the browser that a viewer uses. For a list of support browsers please check the platform compatibility matrix. Following values will be populated in thebrowser_var
when the viewer views an experience:browser_var
Browser Device safari Safari Laptop/PC msafari Safari iPhone chrome Chrome Laptop/PC mchrome Chrome Android ioschrome Chrome iPhone fb Facebook Android/iPhone samsung Samsung Internet Mobile ie Internet Explorer Laptop/PC
All autogenerated variables are generated per viewer when a viewer views an experience.
TIER LIMITS
Capturing user info is a lead generation feature. Free accounts support lead generation from only 100 users.
Want more? Upgrade!
User Variables
A user creating an experience can also make their own variables. These can be used while creating Rules between elements or scenes.
These variables can be added in various parts of a scene, such as a string value which changes after a certain action, or a score box. User variables can also be used for logic functions which are hidden on the outside, for example to change an element after a variable reaches a certain value.
Using Variables in an experience
- Add a TextBox by clicking on the
+
icon. - Put the variable you want to use in the text in double curly brackets: {{VAR}}.
- Add a Rule: Change the value of VAR to (let say "Gmetri") after clicking on any element.