plugin_screeb 0.0.1 copy "plugin_screeb: ^0.0.1" to clipboard
plugin_screeb: ^0.0.1 copied to clipboard

outdated

A flutter plugin to integrate Screeb mobile sdk for Android and/or iOS.

License: MIT Cocoapods Maven Central


Screeb flutter plugin #

A flutter plugin to integrate Screeb mobile sdk for Android and/or iOS.

Getting Started #

Screeb sdk needs to be installed and initialized on each platform before being used in flutter.

Android #

Installation with MavenCentral :

implementation 'app.screeb.sdk:android-sdk:1.1.0'

Initialization in your custom Application class

// simple initialization
val screeb = Screeb.Builder()
        .withContext(this)
        .withChannelId("<website-id>")
        .build()

// detailed initialization using a unique id and custom properties, see Identify visitors section
val screeb = Screeb.Builder()
        .withContext(this)
        .withChannelId("<website-id>")
        .withVisitorId("johndoe@screeb.app") // optional
        .withVisitorProperties(VisitorProperties().apply {
            this["email"] = "johndoe@screeb.app"
            this["age"] = 32
        }) // optional
        .build()

iOS #

Installation instruction in the project's Podfile

pod "Screeb", "0.7.0"

Initialization in your AppDelegate.swift file :

Screeb.initSdk(context: controller, channelId: "<website-id>")

Usage in flutter #

Several commands are available in Screeb flutter plugin api :

SetIdentity command #

PluginScreeb.setIdentity("userId");

SendTrackingEvent command #

// Event example without properties 
PluginScreeb.sendTrackingEvent("eventId");

// Event example with properties 
PluginScreeb.sendTrackingEvent("eventId", <String, dynamic>{
    'isConnected': true,
    'age': 27,
    'company' : 'Screeb',
    'technology' : 'iOS',
    'flutterAccount' : true
});

SendTrackingScreen command #

// Screen event example without properties 
PluginScreeb.sendTrackingScreen("screen_name");

// Screen event example with properties 
PluginScreeb.sendTrackingScreen("screen_name", <String, dynamic>{
    'isConnected': true,
    'age': 27,
    'company' : 'Screeb',
    'technology' : 'iOS',
    'flutterAccount' : true
});

VisitorProperty command #

// VisitorProperty example
PluginScreeb.visitorProperty("screen_name", <String, dynamic>{
    'isConnected': true,
    'age': 27,
    'company' : 'Screeb',
    'technology' : 'iOS',
    'flutterAccount' : true
});
8
likes
0
pub points
75%
popularity

Publisher

unverified uploader

A flutter plugin to integrate Screeb mobile sdk for Android and/or iOS.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on plugin_screeb