# Sending data to GMetri Deployment

You can use query params to send data to a GMetri Deployment using the following format:

```url
https://xxx.gmetri.com/<deployment_slug>?var1=value1&var2=value2...
Eg:
https://xr.gmetri.com/my_metaverse?name=john&theme=blue&tries=7
```

When passing complex values like URLs or tokens, make sure you [`encodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) the value to ensure special characters get passed correctly.

### Example of using query params to override variables

To use outside data in a GMetri experience using URLs, follow these steps

1. Add a custom variable to your experience in editor<br>

   <figure><img src="/files/6lsuPFX0b7adbVmCb6DD" alt=""><figcaption></figcaption></figure>
2. Make use of that variable in your experience any way you want such as via text elements, rules etc./
3. Create a deployment and copy the deployment link. You will get the deployment link as `https://xxx.gmetri.com/yyy`
4. Add the variable you created as a query param to the deployment link as `https://xxx.gmetri.com/yyy?textString=HelloMetaverse!`
5. You'll be able to use the variable in any way in the experience.<br>

Link for the following embed: <https://dcsehw.gmetri.com/floating_rooms_of_tomorrow_blue_1?textString=HelloMetaverse!> You can update the query param and see different results for yourself.

{% embed url="<https://dcsehw.gmetri.com/floating_rooms_of_tomorrow_blue_1?textString=HelloMetaverse>!" %}
A GMetri experience receiving data using query params.&#x20;
{% endembed %}


---

# 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/integrations/sending-data-to-gmetri-deployment.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.
