# Autogenerated Variables

## Auto-generated Variables​ <a href="#autogenerated-variables" id="autogenerated-variables"></a>

Some variables are generated automatically when you create an experience or perform some action. Many of these variables have their values set automatically by the GMetri system. You can use these variables in your Experience logic using [Rules](/metaverse/build/rules.md)or [String Substitution](/metaverse/build/variables/string-substitution.md).

![Auto-generated Variables](https://s.vrgmetri.com/image/q_90/gb-web/portal-docs/assets/img/screenshots/z5/experience_variable_setttings.JPG#boxShadow/)

## Auto-generated Variables - **Predefined**​ <a href="#list-of-auto-generated-variables" id="list-of-auto-generated-variables"></a>

### v\_identifier\_var

`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.

### fullname\_var

`fullname_var` - A string variable that contains the full name of the user if we get it from the authentication mechanism.

### firstname\_var

`firstname_var` - A string variable that contains the first name of the user if we get it from the authentication mechanism.

### lastname\_var

`lastname_var` - A string variable that contains the first name of the user if we get it from the authentication mechanism.

### browser\_var

`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:

<table data-view="cards"><thead><tr><th>Device</th><th>Browser</th><th>browser_var value</th></tr></thead><tbody><tr><td>Laptop/PC</td><td>Safari</td><td><code>safari</code></td></tr><tr><td>Laptop/PC</td><td>Chrome</td><td><code>chrome</code></td></tr><tr><td>Laptop/PC</td><td>Edge</td><td><code>edge-chromium</code></td></tr><tr><td>iPhone</td><td>Chrome</td><td><code>crios</code></td></tr><tr><td>iPhone</td><td>Safari</td><td><code>ios</code></td></tr><tr><td>Android</td><td>Chrome</td><td><code>chrome</code></td></tr><tr><td>Oculus</td><td>Oculus browser</td><td><code>samsung</code></td></tr></tbody></table>

### device\_var

`device_var` - Holds information about the viewer device type. Possible values: `d`,`m`,`h`.

* `d` -> Desktop
* `m` -> Mobile
* `h` -> Headset

### vrmode\_var

`vrmode_var` - Contains `TRUE` if the user enters VR Mode. Otherwise `FALSE`. Changes real-time to reflect the current state.

### scorm\_progress

Share the progress with a LMS.

### scorm\_suspend\_data

Share arbitrary data with a LMS. Persists across sessions.

### scorm\_score

Used to share score with a LMS

### player\_count\_var

Stores the total number of live viewers in the current room instance

### player\_count\_all\_var

Stores the total number of live viewers in all rooms

## Auto-generated Variables - Generated at Runtime

### score <a href="#list-of-auto-generated-variables" id="list-of-auto-generated-variables"></a>

`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

`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.

Other actions like enabling [Lead Generation](/metaverse/build/editor/project-settings/lead-generation.md) form fields and adding Media Upload elements can also add auto-generated variables.

## Example Experience

Here's an experience you can use to check the value of autogenerated variables in different settings: <https://game.gmetri.com/autovariables>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gmetri.com/metaverse/build/variables/autogenerated-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
