Variables
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 (along with Rules).
Variables can store three kinds of values:
- String (Any character, word, sentence)
- Numbers
- Booleans (TRUE/FALSE).
There are three sources of variables in any GMetri experience:
- 1.Custom Variables: These are variables that you add manually to an experience
- 2.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
- 3.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
Adding Custom Variables
Some variables are generated automatically when you create an experience. These variables are immutable - their values cannot be changed using rules.
Autogenerated Variables
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.lang
- The lang
variable can be used by enabling the Show Language Screen
option in the settings section. To add languages, go to the Languages
tab 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.lastname_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: d
,m
,h
.d
-> Desktopm
-> Mobileh
-> Headset
vrmode_var
- Contains TRUE
if 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:Device
Laptop/PC
Browser
Safari
browser_var value
safari
Device
Laptop/PC
Browser
Chrome
browser_var value
chrome
Device
Laptop/PC
Browser
Edge
browser_var value
edge-chromium
Device
iPhone
Browser
Chrome
browser_var value
crios
Device
iPhone
Browser
Safari
browser_var value
ios
Device
Android
Browser
Chrome
browser_var value
chrome
Device
Oculus
Browser
Oculus browser
browser_var value
samsung
Other actions like enabling Lead Generation form fields and adding Media Upload elements can also add auto-generated variables.
Last modified 11d ago