analytix 1.0.2 copy "analytix: ^1.0.2" to clipboard
analytix: ^1.0.2 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");
}
1
likes
0
points
46
downloads

Publisher

verified publisher3p-cups.com

Weekly Downloads

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

License

unknown (license)

Dependencies

csv, flutter, path_provider

More

Packages that depend on analytix