Official Flutter Tracking Library for Mixpanel Analytics

Official Flutter Tracking Library for Mixpanel Analytics

Welcome to the official Mixpanel Flutter SDK. The Mixpanel Flutter SDK is an open-source project! Mixpanel is a product analytics tool that enables you to capture data on how users interact with your digital product.

Mixpanel Flutter SDK

Table of Contents

Introduction

Welcome to the official Mixpanel Flutter SDK. The Mixpanel Flutter SDK is an open-source project, and we'd love to see your contributions! We'd also love for you to come and work with us! Check out Jobs for details

Quick Start Guide

Check out our official documentation for more in depth information on installing and using Mixpanel on Flutter.

Installation

Prerequisite

Steps

  1. Depend on it Add this to your package's pubspec.yaml file:
   dependencies:
      mixpanel_flutter: ^1.0.0 # set this to your desired version
  1. Install it You can install packages from the command line:
   $ flutter pub get
  1. Import it Now in your Dart code, you can use:
import 'package:mixpanel_flutter/mixpanel_flutter.dart';

Integration

Initialization

To start tracking with the SDK you must first initialize with your project token. To initialize the SDK, first add import 'package:mixpanel_flutter/mixpanel_flutter.dart'; and call Mixpanel.init(token); with your project token as it's argument.

import 'package:mixpanel_flutter/mixpanel_flutter.dart';
...
class _YourClassState extends State<YourClass> {
  Mixpanel mixpanel;

  @override
  void initState() {
    super.initState();
    initMixpanel();
  }

  Future<void> initMixpanel() async {
    mixpanel = await Mixpanel.init("Your Mixpanel Token", optOutTrackingDefault: false);
  }
...

Once you've called this method once, you can access mixpanel throughout the rest of your application.

Tracking

Once you've initialized the SDK, Mixpanel will automatically collect common mobile events. You can enable/disable automatic collection through your project settings. With the mixpanel object created in the last step a call to track is all you need to send additional events to Mixpanel.

// Track with event-name
mixpanel.track('Sent Message');
// Track with event-name and property
mixpanel.track('Plan Selected', properties: {'Plan': 'Premium'});

You're done! You've successfully integrated the Mixpanel Flutter SDK into your app. To stay up to speed on important SDK releases and updates, star or watch our repository on Github.

I want to know more!

No worries, here are some links that you will find useful:

Have any questions? Reach out to Mixpanel Support to speak to someone smart, quickly.

Download Details:

Author: mixpanel The Demo/Documentation: View The Demo/Documentation Download Link: Download The Source Code Official Website: https://github.com/mixpanel/mixpanel-flutter

flutter

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Google's Flutter 1.20 stable announced with new features - Navoki

Google has announced new flutter 1.20 stable with many improvements, and features, enabling flutter for Desktop and Web

What is Flutter and why you should learn it?

Flutter is an open-source UI toolkit for mobile developers, so they can use it to build native-looking Android and iOS applications from the same code base for both platforms. Flutter is also working to make Flutter apps for Web, PWA (progressive Web-App) and Desktop platform (Windows,macOS,Linux).

Adobe XD plugin for Flutter with CodePen Tutorial

Recently Adobe XD releases a new version of the plugin that you can use to export designs directly into flutter widgets or screens.

Flutter - How to Add AdMob Real Ads in Flutter App | Flutter AdMob Tutorial

Hello Whats is up Everyone So, Today I am going to show u How to Add Admob Real ads in Flutter apps which are very Easy Implement After watching this video u...

Flutter App Development Company India, Flutter App Developers for Hire

IndianAppDevelopers offers Flutter app development services in India for Android and iOS, Hire our flutter developers to create native experience apps for the end-users.