Guide

How to Add User-Wise Analytics to Your Android, iOS, React Native or Flutter App

Step-by-step: add the Weblytix app SDK to Android, iOS, React Native, Expo, Flutter, Ionic / Capacitor or a web app, identify logged-in users and track orders and offers.

Updated 3 December 2026 · 7 min read · By the Weblytix team

Quick answerCreate an app in Weblytix (Mobile App Analytics → Setup) and copy its key. Install the SDK for your framework, call init() when the app starts, identify(user.id) after login and reset() on logout. Installs, sessions, screens and crashes are recorded on their own; add track() for the actions that matter in your category, such as order_completed. Open the app once and the first event appears within a minute.

1. Add your app in Weblytix

Setup also shows the full install guide with your real keys and your category's events, with buttons to copy it or send it to your developer on WhatsApp or email.

  1. Sign in, open Mobile App Analytics in the sidebar and go to Setup.
  2. Choose what the app is built with: Android, iOS, React Native, Expo, Flutter, web app, Ionic / Capacitor or something else.
  3. Type the app name. The Android package and iOS bundle id are optional: with them, Weblytix reads your category from Google Play / the App Store; without them, they lock on the first event. A web app needs its domain.
  4. Press Add app. You get one key per platform (it starts with wxa_). React Native, Expo, Flutter and Capacitor apps get an Android and an iOS key together.

2. Install the SDK

Pick your framework. Replace wxa_… with the keys from Setup.

Android (Kotlin / Java): settings.gradle.kts and app/build.gradle.kts

repositories { maven { url = uri("https://jitpack.io") } }

implementation("com.github.thinksuitesolution-coder:weblytix-android:1.0.0")

// Application.onCreate()
Weblytix.init(this, "wxa_…")

iOS (Swift): Xcode → File → Add Package Dependencies

https://github.com/thinksuitesolution-coder/weblytix-ios   (from 1.0.0)

// AppDelegate didFinishLaunching, or your App init
import Weblytix
Weblytix.start(key: "wxa_…")

React Native / Expo

npx expo install @react-native-async-storage/async-storage expo-application   # Expo
npm install @react-native-async-storage/async-storage                          # React Native
npm install github:thinksuitesolution-coder/weblytix-js#1.0.0

import Weblytix from "weblytix-js";
import AsyncStorage from "@react-native-async-storage/async-storage";
Weblytix.init({ androidKey: "wxa_…", iosKey: "wxa_…", storage: AsyncStorage, appId: "com.company.app" });

Flutter: pubspec.yaml and main.dart

weblytix_flutter:
  git:
    url: https://github.com/thinksuitesolution-coder/weblytix-flutter
    ref: 1.0.0

import 'package:weblytix_flutter/weblytix_flutter.dart';
Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Weblytix.init(androidKey: 'wxa_…', iosKey: 'wxa_…');
  runApp(MaterialApp(navigatorObservers: [WeblytixObserver()], home: const Home()));
}

Web app (Next.js, React, Vue…)

npm install github:thinksuitesolution-coder/weblytix-js#1.0.0

"use client";
import Weblytix from "weblytix-js";
useEffect(() => { Weblytix.init({ key: "wxa_…" }); }, []);

<!-- or, without a build step -->
<script src="https://cdn.jsdelivr.net/gh/thinksuitesolution-coder/weblytix-js@1.0.0/dist/weblytix.global.js"></script>
<script>Weblytix.init({ key: "wxa_…" });</script>

Ionic / Capacitor

npm install github:thinksuitesolution-coder/weblytix-js#1.0.0

import Weblytix from "weblytix-js";
Weblytix.init({ androidKey: "wxa_…", iosKey: "wxa_…", appId: "com.company.app" });

3. Identify the user after login

This is what makes analytics user-wise. Use your own internal user id, never an email or phone number (Weblytix drops those). Call it after login and on app start if the user is already logged in. Activity from before login joins the same user.

Weblytix.identify(user.id, { plan: "gold" });   // after login
Weblytix.reset();                                // on logout

4. Track the actions that matter

Installs, app opens, sessions, screens, app updates and crashes are recorded on their own. Add track() for your category's key actions. Setup lists the exact events for your category; a shopping app, for example:

Weblytix.track("product_viewed", { product_id: "SKU123", name: "Red Shoes", price: 1499 });
Weblytix.track("promotion_clicked", { promo_id: "diwali_banner", promo_name: "Diwali 20% off" });
Weblytix.track("order_completed", { order_id: "ORD-1001", coupon: "WELCOME10" }, 2998);   // last value = amount

5. Check that data arrives

  1. Run the app once on a phone or emulator (web apps: on the live domain; localhost is ignored).
  2. In Setup the status changes from “Waiting for install” to “Receiving data”, usually within a minute.
  3. Open Live to see users right now, then Users, Commerce, Funnel, Retention and People to act on.

Other frameworks: the HTTP API

Unity, Kotlin Multiplatform, .NET MAUI or your own server can POST events in JSON to https://weblytix.in/api/app/collect. The Setup page for “Something else” shows the exact request format, field names and how to handle each reply.

Frequently asked questions

Does the SDK work in Expo Go?

Yes. weblytix-js is pure JavaScript with no native code, so it works in Expo Go and in development builds.

Do I need App Tracking Transparency on iOS?

No. The Weblytix SDK does not use the advertising identifier (IDFA) and does not track users across other companies' apps.

What if the user is offline?

Events are saved on the device (up to 1,000) and sent when the network is back, in small batches.

Can I send events from my server, for example after payment?

Yes, through the HTTP API, using the same user id as identify() so the order joins that user's activity.

Related

Let Weblytix check this for you

Weblytix runs these checks on your own data and tells you the one thing to fix, with a direct link.