0.0.3 • Published 2 years ago
tganalyticstest v0.0.3
Miniapps analytics
Version 0.0.1
Miniapps analytics is an SDK that allows owners of Telegram web applications to receive analytics about consumer actions of their miniapp.
Installation
- Add the script tag to your html head
<script src="https://unpkg.com/miniappsanalytics@latest/dist/src/index.js" type="text/javascript"></script> 2. Start a conversation with a bot that will give you a unique identifier (https://t.me/analyticsminiapps_bot or @analyticsminiapps_bot)
Example:
2. Start a conversation with a bot that will give you a unique identifier (https://t.me/analyticsminiapps_bot or @analyticsminiapps_bot)
Example:
 3. Initialize the token on your HTML page
3. Initialize the token on your HTML page
<script>
    window.localStorage.setItem('analyticsToken', 'YOUR_TOKEN')
</script>Example:

Result
As a result, after initializing your webapp, the statistics will record that the user has opened a miniapp
