> For the complete documentation index, see [llms.txt](https://tgtaps.gitbook.io/tgtaps-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tgtaps.gitbook.io/tgtaps-docs/mini-app-settings/analytics.md).

# Analytics

You can add Google Analytics to your application.

**Important:** data will appear in following cases:

* you installed the tag 30-60 minutes ago;
* you have online users that spend more than 10 seconds in your app.

1. How to create Google Analytics tag?
2. Click “Settings”:

<figure><img src="/files/BwenKlOBBVb91OHPHJVh" alt=""><figcaption></figcaption></figure>

3. Click “Create Property”:

<figure><img src="/files/EbPuoCXuv6sHWtQR6TFq" alt=""><figcaption></figcaption></figure>

4. Fill all steps with data of your application:

<figure><img src="/files/JbnlFGXFH4yjsoVcVj3V" alt=""><figcaption></figcaption></figure>

5. In the section of “data collection” choose “Web”:

<figure><img src="/files/UhGfmJSqeTAfysIg4CyN" alt=""><figcaption></figcaption></figure>

6. In domain, fill in “[app.tgtaps.com](http://app.tgtaps.com/)“ (this is URL of Telegram Mini App):

<figure><img src="/files/xQgqPOcdcinro9Ybl7xu" alt=""><figcaption></figcaption></figure>

7. Here click “>“:

<figure><img src="/files/AdOpuitOmjXY9f6ByaNJ" alt=""><figcaption></figcaption></figure>

8. The sidebar will be opened, copy the code:

<figure><img src="/files/pehzlwBsQNdPXH6Xi2eC" alt=""><figcaption></figcaption></figure>

Code should look like `G-PHZHTBF5NK`.

9. Copy this code to the Analytics tab and click save:

<figure><img src="/files/J6QN7L3r7k53ImFn3NZF" alt=""><figcaption></figcaption></figure>

Data will appear in about a hour (if the application has users online).

***

Something unclear in docs or you know how to improve article? [Message us in community!](https://docs.tgtaps.com/tgtaps-docs/readme/community)\
We will answer you and then promise to improve the article within 3 days.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://tgtaps.gitbook.io/tgtaps-docs/mini-app-settings/analytics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
