june_flutter 0.0.3 copy "june_flutter: ^0.0.3" to clipboard
june_flutter: ^0.0.3 copied to clipboard

This package is Dart wrapper around the June HTTP API - which allows you to easily track data on June in your Dart projects and Flutter apps.

June #

June is a product analytics tool that allows you to capture data on how users use your product.

This package is Dart wrapper around the June HTTP API - which allows you to easily track data on June in your Dart projects and Flutter apps. Check out the official June documention for more information on using June.

Getting started #

Steps #

Depend on it

Add the june_flutter dependency to your pubspec.yaml and run flutter pub get.

dependencies:
    june_flutter: ^0.x.x # set this to the latest version
copied to clipboard

Import it

Now in your Dart code, you can use:

import 'package:june_flutter/june_flutter.dart';
copied to clipboard

Usage #

1. Initialize June #

To start tracking with the SDK you must first initialize with your June write key. First add import 'package:june_flutter/june_flutter.dart'; and call June.instance.init(writeKey: writeKey);. You can find your write key on the June dashboard.

import 'package:june_flutter/june_flutter.dart';
...
June.instance.init(writeKey: "June Write Key");
...
copied to clipboard

2. Send Data #

Once you've initialized the SDK, you can simply call the June instance to track events and identify users/companies.

Identify #

// Identify user with optional traits
June.instance.identifyUser(userId: 'User ID', properties: {'type': 'admin'});

// Identify company
June.instance.identifyGroup(groupId: 'Company ID', userId: 'User ID', properties: {'plan': 'enterprise'});
copied to clipboard

Track #

// Track event and optional properties
June.instance.track('Recipe Tapped', properties: {'location': 'home_feed'});
copied to clipboard
1
likes
120
points
24
downloads

Publisher

verified publisherdanielgauci.com

Weekly Downloads

2024.07.06 - 2025.01.18

This package is Dart wrapper around the June HTTP API - which allows you to easily track data on June in your Dart projects and Flutter apps.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on june_flutter