rudder_sdk_flutter

Creator: coderz1093

Last updated:

Add to Cart

Description:

rudder sdk flutter

What is Rudder? #
Short answer:
Rudder is an open-source Segment alternative written in Go, built for the enterprise.
Long answer:
Rudder is a platform for collecting, storing and routing customer event data to dozens of tools.
Rudder is open-source, can run in your cloud environment (AWS, GCP, Azure or even your data-centre)
and provides a powerful transformation framework to process your event data on the fly.
Released under MIT License
Getting Started with Flutter SDK #

Add the SDK as a dependency by performing the following steps:


Open pubspec.yaml and add rudder_sdk_flutter under dependencies section:

dependencies:
rudder_sdk_flutter: ^2.1.0
copied to clipboard

Navigate to your Application's root folder and install all the required dependencies with:

flutter pub get
copied to clipboard
Import RudderClient #
Add the below line to import the RudderClient.
import 'package:rudder_sdk_flutter_platform_interface/platform.dart';
import 'package:rudder_sdk_flutter/RudderController.dart';
copied to clipboard
Initialize RudderClient #
Somewhere in your Application, add the following code

RudderConfigBuilder builder = RudderConfigBuilder();
builder.withDataPlaneUrl("https://rudderstacgwyx.dataplane.rudderstack.com");
builder.withControlPlaneUrl("https://api.rudderlabs.com");
builder.withLogLevel(RudderLogger.VERBOSE);
RudderOption options = RudderOption();
options.putIntegration("Amplitude", true);
final String _writeKey = "write_key";
rudderClient.initialize(_writeKey,config: builder.build(), options: options);

copied to clipboard
Send Events #
An example track call is as below
RudderProperty property = RudderProperty();
property.put("test_key_1", "test_key_1");
client.track("test_track_event", properties: property);
copied to clipboard
Device Tokens #
You can pass your device-token for Push Notifications to be passed to the destinations which
support Push Notification. We set the token under context.device.token. An example of setting
the device-token is as below
client.putDeviceToken(<DEVICE_TOKEN>);
copied to clipboard
Anonymous ID #
We use the deviceId as anonymousId by default. You can use the following method to override and
use your own anonymousId with the SDK. You need to call setAnonymousId method before
calling getInstance. An example of setting the anonymousId is as below
client.putAnonymousId(<ANONYMOUS_ID>);
copied to clipboard
Advertising ID #
You can use the setAdvertisingId method to pass your Android and iOS AAID and IDFA respectively.
The setAdvertisingId method accepts a string argument :

advertisingId : Your Android advertisingId (AAID) (or) Your iOS advertisingId (IDFA)
On Android device you need to call setAdvertisingId method before calling getInstance
Example Usage:

client.putAdvertisingId(<ADVERTISING_ID>);
copied to clipboard
The advertisingId parameter you pass to the above method is assigned as AAID if you are
on android device and as IDFA if you are on a iOS device. For more detailed documentation
check the documentation page
.
List of Features #

Data Residency, Custom Context from version 2.4.0
Configurable Collection of Device Id from version 2.5.0
Database Encryption as a separate plugin from version 2.6.0
Gzip compression of payload from version 2.8.0

Contact Us #
If you come across any issues while configuring or using RudderStack, please feel free
to contact us or start a conversation on
our Slack channel. We will be happy to
help you.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.