@tonsolutions/telemetree-react
v1.1.10
Published
TON Solutions Telemetree library for React.js
Downloads
3,812
Readme
TON Solutions Telemetree library for React.js
To learn more about the SDK, here are some useful links:
- Documentation: https://docs.telemetree.io/
- Boilerplate: https://github.com/TONSolutions/react-twa-boilerplate
Installation
Install it from NPM:
$ npm install @tonsolutions/telemetree-react
How to use
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',
});
User data and Processing
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