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
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
Install SDK
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 your Flutter project and run the following command:
flutter pub get
[[Quote: Risk: Moderate]] Unlike in adbrixrm_flutter 1.5.0 or lower, AdBrixRmKit is not directly integrated in AOS or iOS native. Therefore, when updating from version 1.5.0 or lower, code modification is required. Therefore, customers using previous versions should delete their 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 to Android settings.
build.gradle settings
Add the following to the build.gradle file 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]]* Be sure to add
com.android.installreferrer:installreferrer
to prevent Fraud Traffic.
* Be sure to add
com.google.android.gms:play-service-ads-identifier
to obtain Google advertising ID and media advertising.
Androidmanifest.xml permission settings
Add permissions to the AndroidManifest.xml file as follows.
<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 code below to app/proguard-rule.pro so that SDK operation and analysis can proceed smoothly.
## 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 to 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 that inherits FlutterApplication
android:name=".BaseApplication" ... >
Please set the following in 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]]
Check app key & secret key
_ App key and secret key are identification values that DFINERY (Adbrix) uses to distinguish apps.
_ This is a required value for SDK integration, and can be checked after registering the app in the DFINERY (Adbrix) console.
How to check app key and secret key
/
Go to DFINERY (Adbrix) console
[[Quote:Guide:Normal]]
Congratulations!!!
Basic integration for using Definery (Adbrix) has been completed.
The available features are as follows:
1. Reporting to check indicators such as DAU, MAU, and daily retention
2. App introduction campaigns such as nCPI
Additional SDK settings
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 set in native code with the code below in the ATT popup API. (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: based on time
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
To analyze deep link events, link as follows.
Android Settings
Add deep link settings to the MainActivity settings registered in [ AndroidManifest.xml > manifest > application ] as shown below.
<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, set the activity registered in [ AndroidManifest.xml > manifest > application ] as follows. Applink is an optional feature, so please connect only if you 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>
[[Quote:Warning:Normal]] In the your_appkey field, you must enter the Appkey you use when linking. Please enter it in lowercase letters.
[[Quote: Risk: Moderate]] Be sure to check before linking to Applink!
1. To use Applink, be sure to set the deep link pass method to "dynamic pass" when creating a tracking link, enter the deep link path to be moved in the deeplink_custom_path value, which is a parameter attached to the created tracking link, and pass it to Applink.
2. If you arbitrarily modify “is_used_abx_applink=true”, which is automatically added to the value passed as the intent of an activity opened with Applink, accurate advertising performance measurement will not be possible.
3. Applink is an optional feature. If you are not using Applink, this is not required.
Add the code below 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 base Application class that inherits 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 settings
Go to [ General > Target > Info > URL Types ] 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 a 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 Settings (Optional)
Go to [ General > Target > Capablities > Associated Domains ] and set up the universal link as follows.
[[Quote:Warning:Normal]] When adding a universal link, add applinks:your_appkey.adtouch.adbrix.io . In the " your_appkey " field, you must add the Appkey you use when linking . The Appkey should only be in 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 :: UniversalLink was clicked!! incomingURL - \\(incomingURL)") NSLog("UNIVERSAL LINK OPEN!!!!!!!!!!!!!!!!!") AdbrixrmFlutterPlugin.deepLinkOpen(url: incomingURL) return true }
Flutter
Once the settings for each platform are complete, add them to main.dart as follows.
import 'adbrixrm_flutter/adbrixrm.dart' . . . //The following integration location is an example. Please link appropriately where necessary. @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 events
Analyze app users’ login/logout events.
If login is successful, an identification value that identifies the user is transmitted 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); }
[[Quote: Risk: Moderate]]
Precautions when setting event properties (attr) using Map
1.More than 100 pieces of information will not be processed.
2. The data type of the key value is string and cannot exceed 256 characters, and characters other than lowercase English letters and numbers cannot be used.
3. The data length of the Value value cannot exceed 1024 bytes.
4. Value values can only use String, int, long, double, and bool types.
5. The above rules apply to additional event information (attr) using Map for all subsequent events.
general event
Among the events that occur in the app, we analyze commonly occurring events.
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.
- Membership registration channel: (Required) Channel path where the member joined (type: AdBrixSignUpChannel)
- currVersion: (required) Current version (type: String)
- attr: (Optional) Additional event information (type: Map)
void signUp() { // set Additional 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 Additional 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
Analyze user app invitation events that occurred in the app.
- inviteChannel: (required) User invitation channel (type: AdBrixInviteChannel)
- attr: (Optional) Additional event information (type: Map)
void userInvite() { // set Additional 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 Additional 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 delivered in a list format.
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) Quantity (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) Product list composed of AdBrixRmCommerceProductModel (type: List
- orderSales: (required) Total order amount (type: double)
- discount: (required) Order discount amount (type: double)
- delivery charge: (required) delivery charge (type: double)
- payment method: (required) Payment method (type: AdBrixPaymentMethod)
- attr: (Optional) Event additional 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
Analyzes all common user events 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 purchase-related events (viewing product details, adding to shopping cart, etc.) that occur in the app.
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(); }
Enter category (special exhibition)
Analyze events in which users enter the category (special exhibition) screen.
- categoryModel: (required) Category list (type: AdBrixRmCommerceCategoryModel)
- productList: (Required) Product list composed of AdBrixRmCommerceProductModel (type: List
- attr: (Optional) Event additional 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 Additional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'deliveryadress': 'Seoul', 'remaindate': 7, 'mil': 25000.23, 'vip': true }; // Make CategoryList for categoryView 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) Event additional 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 Additional 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) Product list composed of AdBrixRmCommerceProductModel (type: List
- attr: (Optional) Event additional 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 Additional 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 events in which users add products to their wishlist (products of interest).
- 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 Additional 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) Product list composed of AdBrixRmCommerceProductModel (type: List
- discount: (required) Order discount amount (type: double)
- delivery charge: (required) delivery charge (type: double)
- attr: (Optional) Event additional 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 Additional 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) Product list 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 Additional 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) Event additional 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 Additional 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) Channel shared by the user (type: AdBrixSharingChannel)
- productModel: (required) Product information (type: AdBrixRmCommerceProductModel)
- attr: (Optional) Event additional 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 Additional 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) Product list composed of AdBrixRmCommerceProductModel (type: List
- attr: (Optional) Event additional 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 Additional 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) Product list composed of AdBrixRmCommerceProductModel (type: List
- attr: (Optional) Event additional 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 Additional 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) Event additional information (type: Map )
void paymentInfoAdd() { //set Additional 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 completion is through skip (type: bool)
- attr: (Optional) Event additional information (type: Map )
void tutorialCompleted() { // set Additional 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) Event additional information (type: Map )
void characterCreated() { // set Additional 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) Event additional information (type: Map )
void stageCleared() { // set Additional 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) Event additional information (type: Map )
void levelAchieved() { // set Additional Event Value (Optional) Map<String, dynamic> eventproperties = <String, dynamic>{ 'local': 'Seoul', 'age': 36, 'height': 180.50, }; AdBrixRm.gameLevelAchieved(levelAchieved: 33, attr: eventproperties); }
List of removed 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