# Leto Proxy Gateway

## Connect your IPFS gateway to Leto

{% embed url="<https://youtu.be/9xxcHy4ExmM?si=Yx8lSVGTAUxCbDdV>" %}
Video walkthrough of setting up a Leto proxy gateway
{% endembed %}

Developers use dedicated IPFS gateways from a variety of hosting providers to serve IPFS content. In order to collect analytics on a dedicated gateway (e.g. lighthouse.storage), use the [Leto Proxy Gateway](https://leto.gg/).&#x20;

[Login](https://leto.gg) to the Leto dashboard and navigate to "Proxy Gateway"&#x20;

* Select the hosting provider for your gateway. Leto supports:
  * Spheron, Lighthouse.storage, Numbers Protocol, Fleek, Pinata, 4everland, and Quicknode

<figure><img src="https://4005174896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8uUFIFZLPiuuBm5QlAX8%2Fuploads%2FFf3I0YHCoNsXDOaS1jx2%2FScreenshot%202023-12-04%20at%202.26.45%E2%80%AFPM.png?alt=media&#x26;token=dabb0bc3-1c7b-420d-b8d3-21630b2a222e" alt=""><figcaption></figcaption></figure>

* Name your new Leto proxy IPFS gateway and input your existing dedicated gateway address/URL.&#x20;
* Click "Create"

<figure><img src="https://4005174896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8uUFIFZLPiuuBm5QlAX8%2Fuploads%2Faxo4u2U42yMYwt2K3hyJ%2FScreenshot%202023-12-04%20at%202.23.20%E2%80%AFPM.png?alt=media&#x26;token=020ea349-eaee-4fbc-b954-7f4addce686a" alt=""><figcaption></figcaption></figure>

* This will generate a proxy gateway link. Use this new gateway link in your application to serve content to end users.
* Here you can rename or delete your gateway if needed.
* The proxy gateway sends requests to the original dedicated gateway while collecting anonymized analytics!

<figure><img src="https://4005174896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8uUFIFZLPiuuBm5QlAX8%2Fuploads%2FQtwHF83zBSjyOjdHpjne%2FScreenshot%202023-11-07%20at%205.21.44%E2%80%AFPM.png?alt=media&#x26;token=e5866db8-7ae1-45d4-b6c8-10f9a52623aa" alt=""><figcaption></figcaption></figure>

An example will appear below your link showing the syntax needed to retrieve IPFS CIDs with the newly created proxy gateway address.

{% hint style="info" %}
Use /ipfs/{cid} at the end of the proxy gateway address to retrieve a CID.
{% endhint %}

Collect analytics on webpages, NFTs and more without changing your dedicated IPFS gateway provider!&#x20;

## Interact with your analytics&#x20;

Input the IPFS CIDs you would like to track in the [Leto dashboard](https://leto.auth.us-east-1.amazoncognito.com/login?client_id=7rnajbnph8l91gaba84l3pltep\&response_type=code\&scope=email+openid+phone\&redirect_uri=https%3A%2F%2Fapi.leto.gg%2Fauth%2Fcallback) "CIDs" setting.&#x20;

{% hint style="info" %}
Once a Proxy Gateway is created, input CIDs retrieved through the Proxy Gateway into "CIDs" and the analytics for each CID will be displayed. Analytics for CIDs retrieved through the standard Leto Gateway will not display when a Proxy Gateway is live.&#x20;
{% endhint %}

Analytics can also be displayed within any frontend using the [Leto Analytics API](https://letodev.gitbook.io/getting-started/documentation/analytics-rest-api).

<figure><img src="https://4005174896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8uUFIFZLPiuuBm5QlAX8%2Fuploads%2FMgry2NQUfTdiRBToIoWs%2Fdashboard.png?alt=media&#x26;token=7055395f-522f-4d76-bb56-e2ad091a2d6e" alt=""><figcaption></figcaption></figure>


---

# 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://letodev.gitbook.io/getting-started/documentation/leto-proxy-gateway.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.
