analytix 1.0.4 copy "analytix: ^1.0.4" to clipboard
analytix: ^1.0.4 copied to clipboard

A Flutter library for custom analytics manager, capable of sending events to multiple analytics services. Also, it provides a way to gather information about the user's device and the app itself.

example/analytix_example.dart

import 'package:analytix/analytix.dart';
import 'package:analytix/src/abstract/analytix_manager.dart';


void main() {
  _initAnalytics();
  _testAnalytics();
}

_testAnalytics() {
  // Log a screen view
  AnalytixManager().logScreenView("HomeScreen");

  // Log an event
  AnalytixManager().logEvent("button_click", "login_button", params: {
    "button_name": "login",
    "button_color": "blue",
    "button_size": "large",
  });
}

_initAnalytics() {
  // Init the AnalytixManager
  AnalytixManager().init();

  // Set the user properties
  AnalytixManager().setUserId("1234567890");
  AnalytixManager().setUserProperty("name", "Eyal");
  AnalytixManager().setUserProperty("last_name", "Yaakobi");
  AnalytixManager().setUserProperty("email", "eyalya94@gmail.com");
  AnalytixManager().setUserProperty("website", "https://www.3p-cups.com");
  AnalytixManager().setUserProperty("isMale", true);
  AnalytixManager().setUserProperty("isAdmin", false);
  AnalytixManager().setUserProperty("amountOfConnectedSessions", 3);
  AnalytixManager().setUserProperty("lastLoginTime", DateTime.now());
  AnalytixManager().setUserProperty("refreshToken", "FNvof-Qq3llcnu8nvknerk87@#aaAxz-zZq3");
}
copied to clipboard
1
likes
130
points
160
downloads

Publisher

verified publisher3p-cups.com

Weekly Downloads

2024.09.26 - 2025.04.10

A Flutter library for custom analytics manager, capable of sending events to multiple analytics services. Also, it provides a way to gather information about the user's device and the app itself.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

csv, flutter, path_provider

More

Packages that depend on analytix