Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 1.83 KB

README.md

File metadata and controls

62 lines (43 loc) · 1.83 KB

TON Solutions Telemetree library for React.js

Static Badge GitHub top language GitHub commit activity

To learn more about the SDK, here are some useful links:

Alt

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