Skip to content

ellemedit/telemetree-react

 
 

Repository files navigation

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

About

TON Solutions Analytics library for React.js

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%