GMetri experiences fully embrace "variables". Variables allows you to gamify your experiences and orchestrate a variety of interactions.
If you want to add interactivity, you would almost always use variables.
Variables can store three kinds of values:
- String (Any character, word, sentence)
- Booleans (TRUE/FALSE).
There are three sources of variables in any GMetri experience:
- Custom Variables: These are variables that you add manually to an experience
- Global Variables: You can define certain variables in your workspace settings. These variables are then available for use across all experiences in that workspace. The value of this variable is shared across experiences
- Autogenerated Variables: These get added automatically
Variables are very powerful tools that can be used to gamify any experience.
- You can add custom variables by opening Settings > Variables
- Add the variable by clicking on Add Variable Button in the variables tab.
Checking the "track" option allows you to later check the values stored for that variable, for every user, in Analytics Dashboard
Global Variables are shared across all experiences in a workspace. These are helpful if you want to track your users journey across multiple GMetri experiences.
When the user moves from one experience to another in the same workspace, the values in global variables is preserved across experiences
- Head over to
Settingsfrom the top right menu in your Dashboard.
Add Variablein the
- In the Project Editor, go to
- Scroll down to see the
Global Variablessection. Use the dropdown to add the global variable you want to add.
Some variables are generated automatically when you create an experience. These variables are immutable - their values cannot be changed using rules.
score- This is a special number variable that's used to generate the leaderboard in the analytics section. Use this to store any overall score you may have in the experience.
langvariable can be used by enabling the
Show Language Screenoption in the settings section. To add languages, go to the
Languagestab inside Splash Screen. This variable will hold the value of the language selected by the viewer.
v_identifier_var- A unique ID to identify each viewer who views the experience. This can be viewed in the analytics page. Can be email/name etc. - depends on the authentication mechanism used in the Deployment section.
firstname_var- A string variable that contains the first name of the user if we get it from the authentication mechanism.
fullname_var- A string variable that contains the full name of the user if we get it from the authentication mechanism.
device_var- Holds information about the viewer device type. Possible values:
TRUEif the user enters VR Mode. Otherwise
FALSE. Changes real-time to reflect the current state.
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 the browser_var when the viewer views an experience:
Oculus Oculus browser
Other actions like enabling
Lead Generation form fields and adding Media Upload elements can also add auto-generated variables.