percept_flutter 0.0.9
percept_flutter: ^0.0.9 copied to clipboard
Official Percept Analytics Flutter SDK - Developed and Maintained by perceptinsight.com.
Percept-flutter #
Introducing the official Percept Flutter SDK
Getting Started #
1. Install #
Steps #
- Add the following lines to your package's pubspec.yaml file to include the dependency:
dependencies:
percept_flutter: ^0.0.9
- To install the package, use the following command in your command line interface:
$ flutter pub get
- Import the package in your Dart code to make it available for use:
import 'package:percept_flutter/percept_flutter.dart'
- Begin the initialization process for the Percept
import 'package:percept_flutter/percept_flutter.dart'
class YourClassState extends State<YourClass> {
Percept _percept;
@override
void initState() {
super.initState();
_percept=Percept(token)
}
...
2 Set user id #
After successfully initializing the SDK, On login set User id on login using the following function.
// get global properties
_percept.setUserId('U1');
3. Send Data #
You can capture event using the following function. Percept automatically generates a unique ID and stores it in local storage or a cookie.
_percept.capture('AddToCart', properties: {'OrderId': 'O1','UserId':'U1'});
4. Clear #
Call clear function on Logout
_percept.clear();
Support #
If you have any questions, issues, or need assistance with Percept, here are the available support channels:
- Slack: #percept-platform
- GitHub Issues: Project Issues
Please feel free to reach out to us with any concerns or inquiries. We'll do our best to assist you and provide timely support.