To learn more about the SDK, here are some useful links:
- Documentation: https://docs.telemetree.io/
- Boilerplate: https://github.com/TONSolutions/react-twa-boilerplate
Install it from NPM:
$ npm install @tonsolutions/telemetree-react
Call this script in <head>
:
<script src="https://telegram.org/js/telegram-web-app.js"></script>
In your app:
import { TwaAnalyticsProvider } from '@tonsolutions/telemetree-react';
export function App() {
return (
<TwaAnalyticsProvider
projectId="YOUR_PROJECT_ID"
apiKey="YOUR_API_KEY"
appName="YOUR_APPLICATION_NAME"
>
...
</TwaAnalyticsProvider>
);
}
import { useTWAEvent } from '@tonsolutions/telemetree-react';
const builder = useTWAEvent();
builder.track('transfer', {
amount: 1000,
method: 'TON',
});
This library is designed to automatically retrieve user data from Telegram, enhancing your events with valuable insights.
Adhering to Telegram's high standards of security, we employ RSA encryption for the transmission of data across networks, ensuring both the integrity and safety of your analytics processes