# Defining Global Variables

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

## Defining Global Variables[​](https://www.gmetri.com/docs/platform/create/variables#defining-global-variables) <a href="#defining-global-variables" id="defining-global-variables"></a>

* Head over to `Settings` from the top right menu in your [Portal](/metaverse/build/portal.md).
* Click `Add Variable` in the `Global Variables` section

![Defining Global Variables](https://s.vrgmetri.com/image/q_90/gb-web/portal-docs/assets/img/screenshots/variables/defineglobalvars.png)

### **Adding the Global Variables defined above to the experience**[**​**](https://www.gmetri.com/docs/platform/create/variables#adding-the-global-variables-defined-above-to-the-experience)

* In the Project Editor, go to [Settings > Variables](/metaverse/build/editor/project-settings/variables-in-settings.md).
* Scroll down to see the `Global Variables` section. Use the dropdown to add the global variable you want to add.

Read more about Variables here:

{% content-ref url="/pages/4FdURXtqhp12wn0WgUZi" %}
[Variables](/metaverse/build/variables.md)
{% endcontent-ref %}


---

# 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/portal/global-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.
