Integrating DFINERY (Adbrix) [Flutter]
Follow
Quick Start
This is a guide on how to install and initialize the SDK in a Flutter project.
[[인용:보통:위험]]
System Requirements
The Definery Flutter SDK works with the following versions.
1. Flutter: 1.20.0 or higher
2. Dart: 2.12.0 or higher
SDK installation and initialization
SDK Installation
Add the following to the pubspec.yaml file in your Flutter project.
dependencies: adbrixrm_flutter: ^3.0.0
Open a terminal at the top-level file location of the Flutter project and run the following command.
flutter pub get
[[Citation:Risk:Moderate]] Unlike versions below adbrixrm_flutter 1.5.0, AdBrixRmKit is not directly integrated in AOS and iOS native.Therefore, if you are updating from version 1.5.0 or below, code modification is absolutely necessary.Therefore, customers who were using the previous version should remove the dependency on AdBrixRmKit from gradle and cocoaPods.
[[인용:보통:위험]] The versioning rules of adbrixrm_flutter follow Semantic Versioning .
[[인용:보통:위험]] Please check the bottom of the document for APIs that have been deleted as of version 2.1.0.
Android Settings
This is a guide for Android settings.
build.gradle settings
Add the following to the build.gradle file located in the Flutter project -> Android -> app folder.
android { defaultConfig { minSdkVersion 19 } }
dependencies { implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1' implementation 'com.android.installreferrer:installreferrer:2.2' }
[[Quote:Risk:Medium]]* To prevent Fraud Traffic,
com.android.installreferrer:installreferrer
must be added.
* To acquire Google Advertising ID and for media advertising,
com.google.android.gms:play-service-ads-identifier
must be added.
Androidmanifest.xml Permission Settings
Add the following permissions to the AndroidManifest.xml file.
<manifest> ... <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID" /> ... </manifest>
ProGuard Settings
Please add the following code to app / proguard-rule.pro to ensure smooth operation and analysis of the SDK.
## Flutter wrapper -keep class io.flutter.app.** { *; } -keep class io.flutter.plugin.** { *; } -keep class io.flutter.util.** { *; } -keep class io.flutter.view.** { *; } -keep class io.flutter.** { *; } -keep class io.flutter.plugins.** { *; } -dontwarn io.flutter.embedding.* ## AdBrixRm -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {*;} -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$* {*;} -dontwarn com.android.installreferrer
iOS Settings
This is a guide for iOS settings.
Swift Library Settings
Since the DFINERY (Adbrix) SDK is written in Swift, the following settings must be made in the Xcode project.
Set [ Build Settings > Always Embed Swift Standard Libraries ] to ' yes '.
SDK Initialization
Android Settings
AndroidManifest.xml > application settings
<application
//Application class inheriting FlutterApplication
android:name=".BaseApplication" ... >
Please set it as follows in the onCreate() of the class.
import com.igaworks.adbrixrm_flutter.AdbrixrmFlutterPlugin;
public class BaseApplication extends FlutterApplication {
@Override
public void onCreate() {
super.onCreate();
AdbrixrmFlutterPlugin.sdkInit(this, "Your appkey", "Your secretkey");
}
}
import com.igaworks.adbrixrm_flutter.AdbrixrmFlutterPlugin;
class BaseApplication: FlutterApplication() {
override fun onCreate() {
super.onCreate()
AdbrixrmFlutterPlugin.sdkInit(this, "Your appkey", "Your secretkey")
}
}
iOS Settings
import UIKit
import Flutter
import AppTrackingTransparency
import adbrixrm_flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
GeneratedPluginRegistrant.register(with: self)
AdbrixrmFlutterPlugin.sdkInit(appKey: "YOUR_APPKEY", secretKey: "YOUR_SECRETKEY")
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@import adbrixrm_flutter;
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
[AdbrixrmFlutterPlugin sdkInitWithAppKey:@"YOUR_APPKEY" secretKey:@"YOUR_SECRETKEY"];
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
[[Quote:Guide:Normal]]
App Key & Secret Key Check
_ The app key and secret key are identifiers used by Definery (AdBrix) to distinguish the app.
_ This is a necessary value for SDK integration and can be confirmed after registering the app in the DFINERY (Adbrix) console.
How to check App Key and Secret Key
/
Direct link to DFINERY (Adbrix) console
[[Quote:Guide:Normal]]
Congratulations!!!
The basic integration for using Definery (Adbrix) has been completed.
The available features are as follows.
1. Reporting that allows you to check metrics such as DAU, MAU, daily retention
2. App inflow campaigns like nCPI
Additional SDK Configuration
Apple Advertising Identifier (IDFA) Settings
AdBrixRm uses IDFV as the device ID by default, but can be configured to collect IDFA for attribution and other purposes.
IDFA settings can be configured within the ATT popup API in native code using the following code.(The default setting is IDFA off.)
import UIKit
import Flutter
import AppTrackingTransparency
import adbrixrm_flutter
@UIApplicationMain @objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
...
...
}
override func applicationDidBecomeActive(_ application: UIApplication) { if #available(iOS 14, *) { ATTrackingManager.requestTrackingAuthorization {(status) in switch status{ case.authorized: AdbrixrmFlutterPlugin.startGettingIDFA() case.denied: AdbrixrmFlutterPlugin.stopGettingIDFA() case.notDetermined : AdbrixrmFlutterPlugin.stopGettingIDFA() case.restricted: AdbrixrmFlutterPlugin.stopGettingIDFA() default: AdbrixrmFlutterPlugin.stopGettingIDFA() } } } }
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
#import <AppTrackingTransparency/AppTrackingTransparency.h>
@import adbrixrm_flutter;
@implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
if (@available(iOS 14, *)) { [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) { switch (status) { case ATTrackingManagerAuthorizationStatusAuthorized: [AdbrixrmFlutterPlugin startGettingIDFA]; break; case ATTrackingManagerAuthorizationStatusDenied: [AdbrixrmFlutterPlugin stopGettingIDFA]; break; case ATTrackingManagerAuthorizationStatusRestricted: [AdbrixrmFlutterPlugin stopGettingIDFA]; break; case ATTrackingManagerAuthorizationStatusNotDetermined: [AdbrixrmFlutterPlugin stopGettingIDFA]; break; default: [AdbrixrmFlutterPlugin stopGettingIDFA]; break; } }]; } }
Event upload cycle: Based on cumulative number of events
Set to upload events to the DFINERY (Adbrix) server when the set number of events is accumulated.
Set using the values below predefined in the DFINERY (Adbrix) SDK.
- AdBrixEventUploadCountInterval.MIN: 10
- AdBrixEventUploadCountInterval.NORMAL: 30
- AdBrixEventUploadCountInterval.MAX: 60
AdBrixRm.setEventUploadCountInterval( interval: AdBrixEventUploadCountInterval.MIN);
Event upload cycle: Time-based
Set the event to be uploaded to the DFINERY (Adbrix) server after the set time.
Set using the values below predefined in the DFINERY (Adbrix) SDK.
- AdBrixEventUploadTimeInteval.MIN : 30 seconds
- AdBrixEventUploadTimeInteval.NORMAL :60 seconds
- AdBrixEventUploadTimeInteval.MAX :120 seconds
AdBrixRm.setEventUploadTimeInterval( interval: AdBrixEventUploadTimeInterval.MIN);
GDPR settings
You can use the GDPR request event to no longer collect any personal data associated with the data subject in response to a user request.
When this event is called, SDK operation is stopped and all event saving or transmission is not possible.
This feature cannot be restored until the user deletes and reinstalls the app.
AdBrixRm.gdprForgetMe();
Deep link and deferred deep link event integration
Integrate as follows for deep link event analysis.
Android Settings
[ AndroidManifest.xml > manifest > application ] Add the deep link settings to the MainActivity settings as follows.
<intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="your_scheme" android:host="your_host" /> </intent-filter>
When using Android AppLink , configure the activity registered in [ AndroidManifest.xml > manifest > application ] as follows. Applink is an optional feature, so please integrate it only if you choose to use Applink.
<intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="https" android:host="your_appkey.adtouch.adbrix.io" /> </intent-filter>
[[인용:경고:보통]] You must enter the Appkey used for integration in the your_appkey field, and please enter it in lowercase.
[[Quote:Risk:Moderate]] Please make sure to check before linking Applink!
1. To use Applink, you must set the deep link path method to "dynamic path" when creating the tracking link, and enter the deep link path to be moved into the deeplink_custom_path parameter attached to the generated tracking link to deliver it to Applink.
2. If you arbitrarily modify the automatically added "is_used_abx_applink=true" value delivered to the intent of the activity opened by Applink, accurate ad performance measurement will not be possible.
3. Applink is an optional feature. If you do not use Applink, this task is not mandatory.
Add the following code to MainActivity.
import com.igaworks.adbrixrm_flutter.AdbrixrmFlutterPlugin;
public class MainActivity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
}
@Override
protected void onResume() {
super.onResume();
AdbrixrmFlutterPlugin.deeplinkEventWithIntent(getIntent());
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
}
}
class MainActivity: FlutterActivity() { override fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) { super.onCreate(savedInstanceState, persistentState) }
override fun onResume() {
super.onResume()
AdbrixrmFlutterPlugin.deeplinkEventWithIntent(intent)
}
override fun onNewIntent(intent: Intent) { super.onNewIntent(intent)
setIntent(intent)
}
}
Add the following to the basic Application class that inherits from the FlutterApplication class.
import com.igaworks.adbrixrm_flutter.AdbrixrmFlutterPlugin;
public class BaseApplication extends FlutterApplication { @Override public void onCreate() { super.onCreate(); //Add deep link listener AdbrixrmFlutterPlugin.setDeeplinkListener(); //Add deferred deep link listener AdbrixrmFlutterPlugin.setDeferredDeeplinkListener(); }
}
class BaseApplication : FlutterApplication() { override fun onCreate() { super.onCreate() // Add deep link listener AdbrixrmFlutterPlugin.setDeeplinkListener() // Add deferred deep link listener AdbrixrmFlutterPlugin.setDeferredDeeplinkListener()
}
}
iOS Deep Link Setup
[ General > Target > Info > URL Types ] Go to and set the URL Scheme as follows.
Add the application(_ app: open url: options:) delegate to AppDelegate and call the tracking code as follows.
override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { // Add Deep Link Open Tracking Code AdbrixrmFlutterPlugin.deeplinkOpen(with: url)
return true
}
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options { // Add Deep Link Open Tracking Code [AdbrixrmFlutterPlugin deeplinkOpenWith:url]; return YES; }
Add the following code to register the listener at the Flutter level.
import UIKit
import Flutter
import AppTrackingTransparency
import adbrixrm_flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
GeneratedPluginRegistrant.register(with: self)
...
...
...
AdbrixrmFlutterPlugin.setDeeplinkListener()
AdbrixrmFlutterPlugin.setDeferredDeeplinkListener()
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@import adbrixrm_flutter;
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
...
...
...
[AdbrixrmFlutterPlugin setDeeplinkListener];
[AdbrixrmFlutterPlugin setDeferredDeeplinkListener];
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
iOS Universal Link Setup (Optional)
Go to [ General > Target > Capablities > Associated Domains ] and set up the universal link as follows.
[[Quote:Warning:Medium]] When adding a universal link, add it as applinks:your_appkey.adtouch.adbrix.io, and in the " your_appkey " field, add the Appkey you use when linking . The Appkey uses only lowercase letters .
Afterwards, add the code below to AppDelegate to analyze apps opened as universal links.
override func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { guard userActivity.activityType == NSUserActivityTypeBrowsingWeb, let incomingURL = userActivity.webpageURL else { return false } print("DEEPLINK :: UniversialLink was clicked !! incomingURL - \\(incomingURL)") NSLog("UNIVERSAL LINK OPEN!!!!!!!!!!!!!!!!!") AdbrixrmFlutterPlugin.deepLinkOpen(url: incomingURL) return true }
Flutter
Once the settings for each platform are complete, add the following to main.dart.
import 'adbrixrm_flutter/adbrixrm.dart' . . . //The following integration location is an example. Please integrate appropriately where needed. @override void initState() { super.initState();
AdBrixRm.setDeeplinkListener((deeplinkString) {
debugPrint("DEEPLINK = $deeplinkString");
});
AdBrixRm.setDeferredDeeplinkListener((deferredDeeplinkString) {
debugPrint("DEFERRED_DEEPLINK = $deferredDeeplinkString");
}); }
[[Quote: Risk: Small]] The Deeplink value is sent to this API only when the deep link is opened with a DFINERY (Adbrix) tracking link.
User analysis
Login / Logout Event
Analyze the login/logout events of app users.
When login is successful, an identifier that distinguishes the user is provided as shown in the sample code below.
[[인용:보통:위험]]
Login Precautions
The user ID used for login is used for matching between users and devices when using the growth action function. If login is called again without logging out after logging in, correct matching may not occur.
Please be careful not to include personal information in your user ID. If the user ID includes personal information such as email or phone number, we recommend encrypting it.
void login() { if(loginSuccess) {
AdBrixRm.login(userId:'myUserID');
} }
User information~
We analyze the users age, gender, and other information.
void userPropertiesUpdate() { // Set Age AdBrixRm.setAge(age:36); // Set Gender AdBrixRm.setGender(gender : AdBrixGender.MALE); //Addtional UserInfo Map<String, dynamic> properties = <String, dynamic>{ 'adress' : 'Mapo-gu Seoul Korea', 'appmoney': 100.50, 'married' : true }; AdBrixRm.setUserProperties(properties: properties); }
[[Caution: Risk: Moderate]]
Notes on Setting Event Properties (attr) Using Map
1. Information exceeding 100 items will not be processed.
2. The data type of the Key value is string, it cannot exceed 256 characters, and only lowercase English letters and numbers can be used.
3. The data length of the Value cannot exceed 1024 bytes.
4. The Value can only be of type String, int, long, double, or bool.
5. The same rules apply to additional event information (attr) using Map for all subsequent events.
General Event
Analyze common events occurring in the app.
Common event types provided by DFINERY (Adbrix) are as follows.
- join the membership
- app updates
- user invitation
- credit usage
- Make payment
* If you want to view sales by advertising channel in DFINERY (Adbrix), you must link to Payment.
join the membership
Analyze membership registration events that occurred in the app.
- Sign-up Channel: (Required) The channel path through which the member signed up (type: AdBrixSignUpChannel)
- currVersion : (Required) Current version (type : String)
- attr: (Optional) Additional event information (type: Map)
void signUp() { // set Addtional Event Value (Optional) Map<String, dynamic> properties = <String, dynamic>{ 'local' : 'Seoul', 'date' : '2020-10-31', 'channel' : 1 }; AdBrixRm.commonSignUp(channel: AdBrixSignUpChannel.Naver, attr: properties); }
app updates
Analyze app update events that occurred in the app.
- preVersion: (Required) Existing version (type: String)
- currVersion : (Required) Current version (type : String)
- attr : (optional) additional event information (type : Map)
void appUpdate() { // set Addtional Event Value (Optional) Map<String, dynamic> properties = <String, dynamic>{ 'appmarket': 'GooglePlay', 'device': 'google', 'autoupdate': true, }; AdBrixRm.commonAppUpdate( preVersion: '2.0.0', currVersion: '3.0.0', attr: properties); }
user invitation
Analyzing user app invitation events occurring in the app.
- inviteChannel : (Required) User Invitation Channel (type : AdBrixInviteChannel)
- attr : (Optional) Additional event information (type : Map)
void userInvite() { // set Addtional Event Value (Optional) Map<String, dynamic> properties = <String, dynamic>{ 'currentplace': 'Seoul', 'friends': 36, 'credit': 180.50, }; AdBrixRm.commonUserInvite( inviteChannel: AdBrixInviteChannel.Kakao, attr: properties); }
credit usage
Analyze events related to the use of cash currency within the app.
- attr: (Optional) Additional event information (type: Map)
void useCredit() { //set Addtional Event Value (Optional) Map<String, dynamic> properties = <String, dynamic>{ 'local': 'Seoul', 'age': 36, 'height': 180.50, 'creditused': 200.0 }; AdBrixRm.commonUseCredit(attr: properties) }
Make payment
Analyze payment (purchase) events that occurred in the app.
The following product and order information (AdBrixRmCommerceProductModel) is provided in the form of a List.
AdBrixRmCommerceProductModel
- productId : (Required) Product ID (type : string)
- productName: (Required) Product Name (type: double)
- price: (required) : product price (type : double)
- discount : (required) discount amount (type : double)
- quantity : (required) count (type : int)
- currency : (Required) Currency unit (type : AdBrixCurrency)
- category : (Required) Product Category (type : AdBrixRmCommerceCategoryModel)
- productAttr : (Optional) Additional product information (type : Map )
[[인용:보통:위험]] The same rules apply for any AdBrixRmCommerceProductModel coming from a Commerce event.
commonPurchase event
- order id : (required) order number (type : string)
- productList : (required) A list of products composed of AdBrixRmCommerceProductModel (type : List )
- orderSales : (Required) Total order amount (type : double)
- discount: (Required) Order discount amount (type: double)
- delivery charge : (required) 배송비 (type : double)
- payment method : (Required) Payment Method (type : AdBrixPaymentMethod)
- attr: (optional) additional event information (type: Map )
void purchase() { // Set Product // product info (Optional) Map<String, dynamic> productInfo = <String, dynamic>{ 'productbrand': 'AIR_Product', 'limited': 35000, 'currentsale': 3000; 'salesleft': 0.30; 'sale': false }; //Create Product AdBrixRmCommerceProductModel adBrixRmCommerceProductModel1 = AdBrixRmCommerceProductModel.create( productId: 'myproductId', productName: 'productNametest', price: 1000000.0, discount: 250000.0, quantity: 1, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1'); productAttr: productInfo); AdBrixRmCommerceProductModel adBrixRmCommerceProductModel2 = AdBrixRmCommerceProductModel.create( productId: 'productID 2', productName: 'productName2', price: 15000.0, discount: 2500.0, quantity: 3, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1')); //Make a List for ProductModel List<AdBrixRmCommerceProductModel> productlist = <AdBrixRmCommerceProductModel>[]; productlist.add(adBrixRmCommerceProductModel1); productlist.add(adBrixRmCommerceProductModel2); //set Additional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'deliveryadress': 'Seoul', 'remaindate': 7, 'mil': 25000.23, 'vip': true }; AdBrixRm.commonPurchase( orderId: 'myorderid', productList: productlist, orderSale : 755000.0 discount: 1000.0, deliveryCharge: 2500.0; paymentMethod: AdBrixPaymentMethod.MobilePayment, attr: eventproperties); }
Custom Event
Analyze all general events of users within the app.
You can configure events by creating your own event names for events that have not been specified in advance in DFINERY (Adbrix).
- eventName: (Required) Event Name(type : string)
- attr : (Optional) Additional event information (type : Map)
void customEvent() { //set Additional Event Value (Optional) Map<String, dynamic> attr = <String, dynamic>{ 'local': 'Seoul', 'age': 36, 'height': 180.00 }; AdBrixRm.event(eventName: 'your_event_name', attr: attr); }
Commerce event analysis
We analyze events related to purchases occurring in the app (such as viewing product details, adding to cart, etc.).
The types of commerce events provided by DFINERY (Adbrix) are as follows.
- Enter the home (main) screen
- Enter category (special exhibition)
- View product details
- Put in a shopping cart
- Add wishlist (product of interest)
- Confirm your order
- Cancel order
- Search for product
- Share product
- View product list
- View shopping cart
- Enter payment information
Enter the home (main) screen
Analyzes events in which the user enters the apps home (main) screen.
void viewHome() { AdBrixRm.commerceViewHome(); }
Category (Special Exhibition) Entry
Analyze events in which users enter the category (special exhibition) screen.
- (Required) Category list (type: AdBrixRmCommerceCategoryModel)
- productList: (Required) A list of products composed of AdBrixRmCommerceProductModel (type: List )
- attr : (Optional) Additional event information (type : Map )
void categoryView () { // Set Product // product info (Optional) Map<String, dynamic> productInfo = <String, dynamic>{ 'productbrand': 'AIR_Product', 'limited': 35000, 'currentsale': 3000, 'salesleft': 0.30, 'sale': false }; // Create Product AdBrixRmCommerceProductModel adBrixRmCommerceProductModel1 = AdBrixRmCommerceProductModel.create( productId: 'myproductId', productName: 'productNametest', price: 1000000.0, discount: 250000.0, quantity: 1, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1'), productAttr: productInfo); AdBrixRmCommerceProductModel adBrixRmCommerceProductModel2 = AdBrixRmCommerceProductModel.create( productId: 'productID 2', productName: 'productName2', price: 15000.0, discount: 2500.0, quantity: 3, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1')); // Make a List for ProductModel List<AdBrixRmCommerceProductModel> productlist = <AdBrixRmCommerceProductModel>[]; productlist.add(adBrixRmCommerceProductModel1); productlist.add(adBrixRmCommerceProductModel2); //set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'deliveryadress': 'Seoul', 'remaindate': 7, 'mil': 25000.23, 'vip': true }; // Make CategoryList for catagoryView Event AdBrixRmCommerceCategoryModel eventCategoryModel = AdBrixRmCommerceCategoryModel.create( category1: 'eventcategory1', category2: 'eventcategory2', category3: 'eventcategory3', category4: 'eventCategory4', category5: 'eventCategory5'); AdBrixRm.commerceCategoryView ( categoryModel: eventCategoryModel, productList: productlist, attr: eventproperties); }
View product details
We analyze events where users view products in detail.
- productModel : (Required) Product Information (type : AdBrixRmCommerceProductModel)
- attr: (Optional) Additional event information (type: Map )
void productView () { // Set Product // product info (Optional) Map<String, dynamic> productInfo = <String, dynamic>{ 'productbrand': 'AIR_Product', 'limited': 35000, 'currentsale': 3000, 'salesleft': 0.30, 'sale': false }; // Create Product AdBrixRmCommerceProductModel adBrixRmCommerceProductModel1 = AdBrixRmCommerceProductModel.create( productId: 'myproductId', productName: 'productNametest', price: 1000000.0, discount: 250000.0, quantity: 1, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1'), productAttr: productInfo); //set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'deliveryadress': 'Seoul', 'remaindate': 7, 'mil': 25000.23, 'vip': true }; AdBrixRm.commerceProductView( productModel: adBrixRmCommerceProductModel1, attr: eventproperties); }
Put in a shopping cart
We analyze events in which users add products to their shopping carts.
- productList: (Required) A list of products composed of AdBrixRmCommerceProductModel (type: List )
- attr: (Optional) Additional event information (type: Map )
void addtocart() { // Set Product // product info (Optional) Map<String, dynamic> productInfo = <String, dynamic>{ 'productbrand': 'AIR_Product', 'limited': 35000, 'currentsale': 3000, 'salesleft': 0.30, 'sale': false }; // Create Product AdBrixRmCommerceProductModel adBrixRmCommerceProductModel1 = AdBrixRmCommerceProductModel.create( productId: 'myproductId', productName: 'productNametest', price: 1000000.0, discount: 250000.0, quantity: 1, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1'), productAttr: productInfo); AdBrixRmCommerceProductModel adBrixRmCommerceProductModel2 = AdBrixRmCommerceProductModel.create( productId: 'productID 2', productName: 'productName2', price: 15000.0, discount: 2500.0, quantity: 3, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1')); // Make a List for ProductModel List<AdBrixRmCommerceProductModel> productlist = <AdBrixRmCommerceProductModel>[]; productlist.add(adBrixRmCommerceProductModel1); productlist.add(adBrixRmCommerceProductModel2); //set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'deliveryadress': 'Seoul', 'remaindate': 7, 'mil': 25000.23, 'vip': true }; AdBrixRm.commerceAddToCart( productList: productlist, attr: eventproperties); }
Add wishlist (product of interest)
Analyze the event where a user adds a product to the wishlist (favorite items).
- productModel : (Required) Product Information (type : AdBrixRmCommerceProductModel)
- attr: (Optional) Event additional information (type: Map )
void addtowishlist() { // Set Product // product info (Optional) Map<String, dynamic> productInfo = <String, dynamic>{ 'productbrand': 'AIR_Product', 'limited': 35000, 'currentsale': 3000, 'salesleft': 0.30, 'sale': false }; // Create Product AdBrixRmCommerceProductModel adBrixRmCommerceProductModel1 = AdBrixRmCommerceProductModel.create( productId: 'myproductId', productName: 'productNametest', price: 1000000.0, discount: 250000.0, quantity: 1, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1'), productAttr: productInfo); //set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'deliveryadress': 'Seoul', 'remaindate': 7, 'mil': 25000.23, 'vip': true }; AdBrixRm.commerceAddToWishList( productModel: adBrixRmCommerceProductModel1, attr: eventproperties); }
Confirm your order
We analyze the final confirmation event that a user confirms before paying for a product.
- order id : (required) order number (type : string)
- productList : (Required) A list of products composed of AdBrixRmCommerceProductModel (type : List )
- discount: (Required) Order discount amount (type: double)
- delivery charge : (required) 배송비 (type : double)
- attr: (Optional) Additional event information (type: Map )
void reviewOrder() { // Set Product // product info (Optional) Map<String, dynamic> productInfo = <String, dynamic>{ 'productbrand': 'AIR_Product', 'limited': 35000, 'currentsale': 3000, 'salesleft': 0.30, 'sale': false }; // Create Product AdBrixRmCommerceProductModel adBrixRmCommerceProductModel1 = AdBrixRmCommerceProductModel.create( productId: 'myproductId', productName: 'productNametest', price: 1000000.0, discount: 250000.0, quantity: 1, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1'), productAttr: productInfo); AdBrixRmCommerceProductModel adBrixRmCommerceProductModel2 = AdBrixRmCommerceProductModel.create( productId: 'productID 2', productName: 'productName2', price: 15000.0, discount: 2500.0, quantity: 3, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1')); // Make a List for ProductModel List<AdBrixRmCommerceProductModel> productlist = <AdBrixRmCommerceProductModel>[]; productlist.add(adBrixRmCommerceProductModel1); productlist.add(adBrixRmCommerceProductModel2); //set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'deliveryadress': 'Seoul', 'remaindate': 7, 'mil': 25000.23, 'vip': true }; AdBrixRm.commerceReviewOrder( orderId: 'myOrderID', productList: productlist, discount: 5000.0, deliveryCharge: 2500.0, attr: eventproperties); }
Cancel order
Analyze events in which a user canceled an order or issued a refund.
- order id : (required) order number (type : string)
- productList : (Required) A list of products composed of AdBrixRmCommerceProductModel (type : List )
- penaltyCharge : (Required) Order cancellation penalty amount (type: double)
- attr: (Optional) Event additional information (type: Map )
void refund() { // Set Product // product info (Optional) Map<String, dynamic> productInfo = <String, dynamic>{ 'productbrand': 'AIR_Product', 'limited': 35000, 'currentsale': 3000, 'salesleft': 0.30, 'sale': false }; // Create Product AdBrixRmCommerceProductModel adBrixRmCommerceProductModel1 = AdBrixRmCommerceProductModel.create( productId: 'myproductId', productName: 'productNametest', price: 1000000.0, discount: 250000.0, quantity: 1, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1'), productAttr: productInfo); AdBrixRmCommerceProductModel adBrixRmCommerceProductModel2 = AdBrixRmCommerceProductModel.create( productId: 'productID 2', productName: 'productName2', price: 15000.0, discount: 2500.0, quantity: 3, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1')); // Make a List for ProductModel List<AdBrixRmCommerceProductModel> productlist = <AdBrixRmCommerceProductModel>[]; productlist.add(adBrixRmCommerceProductModel1); productlist.add(adBrixRmCommerceProductModel2); //set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'deliveryadress': 'Seoul', 'remaindate': 7, 'mil': 25000.23, 'vip': true }; AdBrixRm.commerceRefund( orderId: 'myOrderID', productList: productlist, penaltyCharge: 5000.0, attr: eventproperties); }
Search for product
Analyze events in which users search for products.
- keyword: (Required) Search keyword (type: string)
- productList : (Required) Product list composed of AdBrixRmCommerceProductModel (type : List )
- attr : (Optional) Additional event information (type : Map )
void search() { // Set Product // product info (Optional) Map<String, dynamic> productInfo = <String, dynamic>{ 'productbrand': 'AIR_Product', 'limited': 35000, 'currentsale': 3000, 'salesleft': 0.30, 'sale': false }; // Create Product AdBrixRmCommerceProductModel adBrixRmCommerceProductModel1 = AdBrixRmCommerceProductModel.create( productId: 'myproductId', productName: 'productNametest', price: 1000000.0, discount: 250000.0, quantity: 1, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1'), productAttr: productInfo); AdBrixRmCommerceProductModel adBrixRmCommerceProductModel2 = AdBrixRmCommerceProductModel.create( productId: 'productID 2', productName: 'productName2', price: 15000.0, discount: 2500.0, quantity: 3, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1')); // Make a List for ProductModel List<AdBrixRmCommerceProductModel> productlist = <AdBrixRmCommerceProductModel>[]; productlist.add(adBrixRmCommerceProductModel1); productlist.add(adBrixRmCommerceProductModel2); //set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'deliveryadress': 'Seoul', 'remaindate': 7, 'mil': 25000.23, 'vip': true }; AdBrixRm.commerceSearch( keyword: 'your_keyword', productList: productlist, attr: eventproperties); }
Share product
Analyze events in which users share product information.
- sharingChannel : (Required) The channel shared by the user (type : AdBrixSharingChannel)
- productModel : (Required) Product Information (type : AdBrixRmCommerceProductModel)
- attr: (Optional) Additional event information (type: Map )
void share() { // Set Product // product info (Optional) Map<String, dynamic> productInfo = <String, dynamic>{ 'productbrand': 'AIR_Product', 'limited': 35000, 'currentsale': 3000, 'salesleft': 0.30, 'sale': false }; // Create Product AdBrixRmCommerceProductModel adBrixRmCommerceProductModel1 = AdBrixRmCommerceProductModel.create( productId: 'myproductId', productName: 'productNametest', price: 1000000.0, discount: 250000.0, quantity: 1, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1'), productAttr: productInfo); //set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'deliveryadress': 'Seoul', 'remaindate': 7, 'mil': 25000.23, 'vip': true }; AdBrixRm.commerceShare( sharingChannel: AdBrixSharingChannel.KAKAOSTORY, productModel: adBrixRmCommerceProductModel1, attr: eventproperties); }
View product list
Analyze events in which users view product lists.
- productList: (Required) A list of products composed of AdBrixRmCommerceProductModel (type: List )
- attr: (Optional) Additional event information (type: Map )
void listView() { // Set Product // product info (Optional) Map<String, dynamic> productInfo = <String, dynamic>{ 'productbrand': 'AIR_Product', 'limited': 35000, 'currentsale': 3000, 'salesleft': 0.30, 'sale': false }; // Create Product AdBrixRmCommerceProductModel adBrixRmCommerceProductModel1 = AdBrixRmCommerceProductModel.create( productId: 'myproductId', productName: 'productNametest', price: 1000000.0, discount: 250000.0, quantity: 1, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1'), productAttr: productInfo); AdBrixRmCommerceProductModel adBrixRmCommerceProductModel2 = AdBrixRmCommerceProductModel.create( productId: 'productID 2', productName: 'productName2', price: 15000.0, discount: 2500.0, quantity: 3, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1')); // Make a List for ProductModel List<AdBrixRmCommerceProductModel> productlist = <AdBrixRmCommerceProductModel>[]; productlist.add(adBrixRmCommerceProductModel1); productlist.add(adBrixRmCommerceProductModel2); //set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'deliveryadress': 'Seoul', 'remaindate': 7, 'mil': 25000.23, 'vip': true }; AdBrixRm.commerceListView( productList: productlist, attr: eventproperties); }
View shopping cart
Analyze events in which users view their shopping carts.
- productList : (Required) A list of products composed of AdBrixRmCommerceProductModel (type : List
- attr: (Optional) Additional event information (type: Map )
void cartView() { // Set Product // product info (Optional) Map<String, dynamic> productInfo = <String, dynamic>{ 'productbrand': 'AIR_Product', 'limited': 35000, 'currentsale': 3000, 'salesleft': 0.30, 'sale': false }; // Create Product AdBrixRmCommerceProductModel adBrixRmCommerceProductModel1 = AdBrixRmCommerceProductModel.create( productId: 'myproductId', productName: 'productNametest', price: 1000000.0, discount: 250000.0, quantity: 1, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1'), productAttr: productInfo); AdBrixRmCommerceProductModel adBrixRmCommerceProductModel2 = AdBrixRmCommerceProductModel.create( productId: 'productID 2', productName: 'productName2', price: 15000.0, discount: 2500.0, quantity: 3, currency: AdBrixCurrency.KR_KRW, category: AdBrixRmCommerceCategoryModel.create(category1: 'categoryTest1')); // Make a List for ProductModel List<AdBrixRmCommerceProductModel> productlist = <AdBrixRmCommerceProductModel>[]; productlist.add(adBrixRmCommerceProductModel1); productlist.add(adBrixRmCommerceProductModel2); //set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'deliveryadress': 'Seoul', 'remaindate': 7, 'mil': 25000.23, 'vip': true }; AdBrixRm.commerceCartView( productList: productlist, attr: eventproperties); }
Enter payment information
Analyze events where users enter payment information.
- attr : (Optional) Additional event information (type : Map )
void paymentInfoAdd() { //set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'local': 'Seoul', 'age': 36, 'height': 180.50, }; AdBrixRm.commercePaymentInfoAdd(attr: eventproperties); }
Game event analysis
Analyze game-related events (tutorials, stages, etc.) that occur in the app.
The types of game events provided by DFINERY (Adbrix) are as follows.
- Tutorial completed
- character generation
- Stage completed
- Level achieved
Tutorial completed
Analyze tutorial completion events that occur in the app.
- isSkip : (Required) Whether it is completed through skipping (skip) (type : bool)
- attr : (optional) additional event information (type : Map )
void tutorialCompleted() { // set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'local': 'Seoul', 'age': 36, 'height': 180.50, }; AdBrixRm.gameTutorialComplete(isSkip: true, attr: eventproperties); }
character generation
Analyze character creation events that occurred in the app.
- attr : (Optional) Additional event information (type : Map )
void characterCreated() { // set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'local': 'Seoul', 'caractername': 'myCharacterName', 'age': 36, 'height': 180.50, }; AdBrixRm.gameCharacterCreated(attr: eventproperties); }
Stage completed
Analyze stage completion events that occur in the app.
- stageName: (Required) Completed stage name (type: string)
- attr: (Optional) Additional event information (type: Map )
void stageCleared() { // set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'local': 'Seoul', 'age': 36, 'height': 180.50, }; AdBrixRm.gameStageCleared(stageName: '11-5', attr: eventproperties); }
Level achieved
Analyze level achievement events that occurred in the app.
- levelAchieved : (Required) Level achieved (type: int)
- attr: (Optional) Additional event information (type: Map )
void levelAchieved() { // set Addtional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'local': 'Seoul', 'age': 36, 'height': 180.50, }; AdBrixRm.gameLevelAchieved(levelAchieved: 33, attr: eventproperties); }
List of Deleted APIs
Flutter
- setPushLocalCallbackListener
- setDidFetchInAppMessageListener
- setDidPrintLogListener
- flushAllEvents
- deleteUserDataAndStopSDK
- restartSDK
- getSdkVersion
- fetchActionHistoryByUserId
- fetchActionHistoryByAdid
- getActionHistory
- getAllActionHistory
- deleteActionHistory
- deleteAllActionHistoryByUserId
- clearSyncedActionHistoryInLocalDB
- setInAppMessageFetchMode
- setInAppMessageToken
- setBigTextClientPushEvent
- setBigPictureClientPushEvent
- registeriOSLocalPushNotification
- cancelLocalPushNotification
- getPushEventList
- setPushIconStyle
- setNotificationOption
iOS
- localPushOpen
- setDidFetchInAppMessageListener
AOS
- setLocalPushMessageListener
- setDfnInAppMessageAutoFetchListener
- setLogListener