DFINERY Integration [Unity - iOS]
FollowQuick Start
Download SDK
DFINERY(AdBrix) Unity Package : [Download (Updated : 09/28/2022)]
Install Unity Package
1. Open the existing Unity project.
[Open existing Unity project]
2. Drag and drop *.package file to existing Unity project's Asset window.
[Drag & Drop AdBrix SDK package file ]
3. Unless the project is developed with AOS simultaneously, select the only iOS directory by unchecking the Android directory and import.
SDK init
To add DFINERY (AdBrix) SDK init code you requires to export your Unity project to Xcode. In Xcode project add the SDK inti code to UnityAppController.mm's didFinishLaunchingWithOption method.
#import "AdBrixRmKit-Swift.h" - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. // AdBrixRM instance AdBrixRM *adBrix = [AdBrixRM sharedInstance]; // AdBrix Appkey / secret key [adBrix initAdBrixWithAppKey:@"your_app_key" secretKey:@"your_secret_key"]; return YES; }
Go to Build Settings option and change "YES" on "Always Embed Swift Standard Libraries"
Additional SDK setup
Event uploading cycle setup
You can set the criteria for uploading cycles for events to the AdBrix server.
The event upload cycle can be set by the number of accumulative events and timer.
* Events are uploaded based on the first out of two criteria.
By the number of accumulative events
Set event data to be uploaded to adbrix server when the preset counts of events are accumulated.
Use the following predefined values in the adbrix SDK.
- AdBrixRm.AdBrixEventUploadCountInterval.MIN : 10 events
- AdBrixRm.AdBrixEventUploadCountInterval.NORMAL : 30 events
- AdBrixRm.AdBrixEventUploadCountInterval.MAX : 60 events
using UnityEngine.UI; using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; using System; using UnityEngine.iOS; using AdBrixRmIOS; public class AdBrixRmSample_iOS : MonoBehaviour { void Start () { AdBrixRm.setEventUploadCountInterval(AdBrixRm.AdBrixEventUploadCountInterval.MIN); } }
By time frame
Set event data to be uploaded to adbrix server after the preset time has elapsed.
Use the following predefined values in the adbrix SDK.
- AdBrixRM.AdBrixEventUploadTimeInteval.MIN: every 30 seconds
- AdBrixRM.AdBrixEventUploadTimeInteval.NORMAL: every 60 seconds
- AdBrixRM.AdBrixEventUploadTimeInteval.MAX: every 120 seconds
using UnityEngine; using UnityEngine.UI; using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; using System; using UnityEngine.iOS; using AdBrixRmIOS; public class AdBrixRmSample_iOS : MonoBehaviour { void Start () { AdBrixRm.setEventUploadTimeInterval(AdBrixRm.AdBrixEventUploadTimeInterval.MIN); } }
GDPR
GDPR event can delete all of the user data when this event is called. After this event call, SDK will stop working. This event cannot be undone unless the user reinstalls the app after deleting the app.
void gdprForgetMeEvent() { AdBrixRm.gdprForgetMe (); }
Start from Sample Project
The AdBrix Unity package file includes a sample project along with the SDK.
To see the sample source, check the scene_sample.unity file and AdBrixRmSample_AOS.cs file in the same location in the [Import Pop Up] screen above, which is in the same location as the below to see the sample source.
[ Check scene_sample.unity, AdBrixRmSample_iOS.cs File ]
Deeplink / Deferred Deeplink
Deelink Setting
Go to File -> Build Settings -> Player Settings -> Player -> iOS and setup the deeplink scheme value on "Support URL schemes" section.
Add Deeplink handler on script that controll the DFINERY's API
public class AdBrixSDKController : MonoBehaviour { public void HandleDidReceiveDeeplink (string deeplinkValue){ Debug.Log("HandleDidReceiveDeeplink : "+ deeplinkValue); } }
SDK will pass deeplink value on HandleDidReceiveDeeplink method deepLinkValue parameter.
Export your Unity project to Xcode. Add deeplink handler on UnityAppController.mm
#import "AdBrixRmKit-Swift.h" #import "AdBrixRmBridge.h" - (BOOL)application:(UIApplication*)app openURL:(NSURL*)url options:(NSDictionary<NSString*, id>*)options { // AdBrixRM instance AdBrixRM *adBrix = [AdBrixRM sharedInstance]; // deeplink Open event [adBrix deepLinkOpenWithUrl:url]; return YES; } - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. // AdBrixRM instalce AdBrixRM *adBrix = [AdBrixRM sharedInstance]; // AdBrix Appkey / secretkey [adBrix initAdBrixWithAppKey:@"your_app_key" secretKey:@"your_secret_key"]; // Add Deeplink Handler(GAME_OBJECT_NAME + DeeplinkHandler method) [[AdBrixRmBridge sharedAdBrixRmBridge] setAdBrixDeeplinkDelegate:@"AbxObject" function:@"HandleDidReceiveDeeplink"]; return YES; }
[[인용:위험:작게]] ※ GAME_OBJECT_NAME is must be the same with your setting on Unity.
Deferred Deeplink Setting
Add DeferredDeeplink handler on script that controll the DFINERY's API
public class AdBrixSDKController : MonoBehaviour { public void HandleDidReceiveDeferredDeeplink (string deferredDeepLinkValue){ Debug.Log("HandleDidReceiveDeferredDeeplink : "+ deferredDeepLinkValue); } }
SDK will pass Deferred Deeplink value on HandleDidReceiveDeferredDeeplink method deepLinkValue parameter.
Export your Unity project to Xcode. Add deeplink handler on UnityAppController.mm
#import <AdBrixRM/AdBrixRM-Swift.h> #import "AdBrixRmBridge.h" - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. // AdBrixRM 인스턴스 생성 AdBrixRM *adBrix = [AdBrixRM sharedInstance]; // AdBrix 앱키&시크릿키 설정 [adBrix initAdBrixWithAppKey:@"your_app_key" secretKey:@"your_secret_key"]; // 디퍼드 딥링크 핸들러 등록 (GAME_OBJECT_NAME + DeferredDeeplinkHandler) [[AdBrixRmBridge sharedAdBrixRmBridge] setAdBrixDeferredDeeplinkDelegate:@"AbxObject" function:@"HandleDidReceiveDeferredDeeplink"]; return YES; }
[[인용:위험:작게]] ※ GAME_OBJECT_NAME is must be the same with your setting on Unity.
[[인용:위험:작게]] You cannot use Facebook SDK 'fetchDeferredAppLinkData'
If you want to integrate AdBrix DeferredDeeplink API, you have to delete Facebook SDK fetchDeferredAppLinkData API.
App Event Analytics
Using AdBrix SDK, you can analyze the in-app events and create an in-app event report at AdBrix dashboard.
To analyze the In-app event, you must add Adbrix event API when the event is executed.
AdBrix SDK provides 5 different types of In-app event API
- User Analysis
- Login / Logout Event
- User information
- User location
- Custom Analysis
- General Analysis
- Signup
- App update
- User invitation
- Use in-app credit
- In-Purchase
- Commerce Analysis
- Home view
- Category view
- Product view
- Add to cart
- Add to wishlist
- Review order
- Refund
- Product search
- Product share
- Product listview
- Cart view
- Payment information
- Game Analysis
- Tutorial complete
- Create character
- Stage complete
- Level up
User Analytics
Login / Logout Event
You can analyze your app users' login and logout events.
When login is successful, send the user ID (user defining parameter) as follows.
void sampleFunction() { if(isLoginSuccess) { // When login is successful, send user ID like "user_1234" AdBrixRm.login ("user_1234"); } }
* Please be careful not to include any personal information in the user ID being sent. If personal information such as email or phone number is included, it is recommended to properly encrypt the data by BASE64, MD5, SHA1, and etc.
User Properties
You can analyze user properties such as age, gender, and others.
void sampleFunction() { //Age AdBrixRm.setAge (20); //Gender AdBrixRm.setGender(AdBrixRm.Gender.FEMALE); //Other user properties Dictionary<string, string> dict = new Dictionary<string, string>(); dict.Add("key1", "value1"); AdBrixRm.setUserProperties (dict); }
[[인용:위험:보통]]Regulations of user and event data using Dictionary
1. You can send up to 100 data.
2. The data type of Key should be String and up to 256 letters with lowercase alphabetic characters and numbers only.
3. The Value data can be up to 1024byte.
User location
If you get the user location, you can send it to AdBrix for analysis.
void sampleFunction() { // Location info (lat, lon) AdBrixRm.setLocationWithLatitude(39.00, 121.00); }
Custom Event Analytics
All general in-app events except purchase-related events can be analyzed.
You can analyze a customized user's action for yourself using string.
void sampleFunction() { //Custom Event AdBrixRm.events ("event_name"); }
Common/ General Event Analytics
AdBrix provides the following type of common event:
- Registration/ Sign Up
- App Update
- User Invitation
- Credit Usage
- Payment
* To measure purchase data by media, it is required to integrate 'Purchase.'
Registration/ Sign Up
You can analyze in-app registration/sign-up events.
void userSignup() { // Registered user information Dictionary<string, string> dict = new Dictionary<string, string>(); dict.Add("key1", "value1"); AdBrixRm.commonSignUp(AdBrixRm.SignUpChannel.Google, dict); }
App Update
You can analyze app update events.
void appUpdate() { // user information Dictionary<string, string> dict = new Dictionary<string, string>(); dict.Add("key1", "value1"); AdBrixRm.commonAppUdate("1.2.2a","1.3.0",dict); }
User Invitation
You can analyze in-app user invitation events.
void userInvite() { // user information Dictionary<string, string> dict = new Dictionary<string, string>(); dict.Add("key1", "value1"); AdBrixRm.commonSignUp(AdBrixRm.InviteChannel.Facebook, dict); }
Credit Usage
You can analyze events for the usage of cashable credit.
void useCredit() { // Credit usage information Dictionary<string, string> credit_info= new Dictionary<string, string>(); credit_info.Add("credit", "20000"); AdBrixRm.commonSignUp(credit_info); }
Payment
You can analyze in-app payment/ purchase events.
The following product and order-related data are sent in the form of an array.
- order id : (required) Order ID
- product id : (required) Product ID
- product name : (required) Product Name
- price : (required) Product Price
- quantity : (required) Purchase Quantity
- discount : (optional) Discounted Amount
- currency string : (optional) Purchase Currency Unit
- category : (optional) Product Category
- extra attr json : (optional) Product Details and Options
- delivery charge : (optional) Delivery Charge
- payment method : (optional) Payment Method
void sampleFunction() { //Arrange product list List<AdBrixRm.AdBrixRmCommerceProductModel> items = new List<AdBrixRm.AdBrixRmCommerceProductModel> (); //Create dictionary for product detail options Dictionary<string, string>productAttrs = new Dictionary<string, string>(); productAttrs.Add ("Att1", "Value1"); productAttrs.Add ("Att2", "Value2"); productAttrs.Add ("Att3", "Value3"); //Create a product AdBrixRm.AdBrixRmCommerceProductModel productModel = AdBrixRm.AdBrixRmCommerceProductModel.create ( "productId01", "productName01", 10000.00, 1, 5000.00, AdBrixRm.AdBrixCurrencyName(AdBrixRm.Currency.KR_KRW), AdBrixRm.AdBrixRmCommerceProductCategoryModel.create ("Cate1", "Cate2", "Cate3"), AdBrixRm.AdBrixRmCommerceProductAttrModel.create (productAttrs) ); //Create a product AdBrixRm.AdBrixRmCommerceProductModel productModel2 = AdBrixRm.AdBrixRmCommerceProductModel.create ( "productId02", "productName02", 10000.00, 1, 5000.00, AdBrixRm.AdBrixCurrencyName(AdBrixRm.Currency.KR_KRW), AdBrixRm.AdBrixRmCommerceProductCategoryModel.create ("Cate1", "Cate2", "Cate3"), AdBrixRm.AdBrixRmCommerceProductAttrModel.create (productAttrs) ); items.Add (productModel); items.Add (productModel2); //Event for product purchase AdBrixRm.commonPurchase ("30290121", items, 1000.00, 3500.00, AdBrixRm.PaymentMethod.CREDIT_CARD); }
Commerce Event Analytics
You can analyze purchase-related in-app events, e.g. product detail view and add to cart.
AdBrix provides the following type of commerce events:
- Home/ Main page view
- Category page/ event page view
- Product detail view
- Add to cart
- Add to wishlist
- View an order
- Cancel an order
- Search a product
- View product list
- Share a product
- View cart
- Fill in payment information
Home/ Main Page View
You can analyze the event when users view the home/ main page.
void sampleFunction() { AdBrixRm.commerceViewHome (); }
Category / Event Page View
You can analyze the event when users view the category/event page.
Category information can be analyzed down to a maximum of 5 levels.
void sampleFunction() { //Create product in the category AdBrixRm.AdBrixRmCommerceProductModel productModel = AdBrixRm.AdBrixRmCommerceProductModel.create ( "productId01", "productName01", 10000.00, 1, 5000.00, AdBrixRmAOS.AdBrixRm.Currency.KR_KRW, AdBrixRm.AdBrixRmCommerceProductCategoryModel.create ("Sale- Pants and Skirts"), AdBrixRm.AdBrixRmCommerceProductAttrModel.create (productAttrs) ); items.Add (productModel); //Category view event AdBrixRm.commerceCategoryView (AdBrixRmCommerceProductCategoryModel.create("기획전"), items); }
Product Detail View
You can analyze the event that users view product details.
The following product-related data are sent.
- product id : (required) Product ID
- product name : (required) Product Name
- price : (required) Product Price
- quantity : (required) Purchase Quantity
- discount : (optional) Discounted Amount
- currency string : (optional) Purchase Currency Unit
- category : (optional) Product Category
- product attr map : (optional) Product Detail Option
void sampleFunction() { //Create dictionary for product detail option Dictionary<string, string> productAttrs = new Dictionary<string, string>(); productAttrs.Add ("Att1", "Value1"); productAttrs.Add ("Att2", "Value2"); productAttrs.Add ("Att3", "Value3"); //Create product AdBrixRm.AdBrixRmCommerceProductModel productModel = AdBrixRm.AdBrixRmCommerceProductModel.create ( "productId01", "productName01", 10000.00, 1, 5000, AdBrixRmAOS.AdBrixRm.Currency.KR_KRW, AdBrixRm.AdBrixRmCommerceProductCategoryModel.create ("Cate1", "Cate2", "Cate3"), AdBrixRm.AdBrixRmCommerceProductAttrModel.create (productAttrs) ); //Product detail view AdBrixRm.commerceProductView (productModel); }
Add to Cart
You can analyze the event that users add products to the cart.
The following product-related data are sent.
- product id : (required) Product ID
- product name : (required) Product Name
- price : (required) Product Price
- quantity : (required) Purchase Quantity
- discount : (optional) Discounted Amount
- currency string : (optional) Purchase Currency Unit
- category : (optional) Product Category
- product attr map : (optional) Product Detail Option
void sampleFunction() { //Arrange product list List<AdBrixRm.AdBrixRmCommerceProductModel> items = new List<AdBrixRm.AdBrixRmCommerceProductModel> (); //Create dictionary for product detail option Dictionary<string, string>productAttrs = new Dictionary<string, string>(); productAttrs.Add ("Att1", "Value1"); productAttrs.Add ("Att2", "Value2"); productAttrs.Add ("Att3", "Value3"); //Create product AdBrixRmCommerceProductModel productModel = AdBrixRmCommerceProductModel.create ( "productId01", "productName01", 10000.00, 1, 5000.00, AdBrixRmAOS.AdBrixRm.Currency.KR_KRW, AdBrixRm.AdBrixRmCommerceProductCategoryModel.create ("Cate1", "Cate2", "Cate3"), AdBrixRm.AdBrixRmCommerceProductAttrModel.create (productAttrs) ); items.Add (productModel); //Add to cart event AdBrixRm.commerceAddToCart(items); }
Add to Wishlist
You can analyze the event that users add products to the wishlist.
The following product-related data are sent.
- product id : (required) Product ID
- product name : (required) Product Name
- price : (required) Product Price
- quantity : (required) Purchase Quantity
- discount : (optional) Discounted Amount
- currency string : (optional) Purchase Currency Unit
- category : (optional) Product Category
- product attr map : (optional) Product Detail Option
void sampleFunction() { //Create dictionary for product detail option Dictionary<string, string>productAttrs = new Dictionary<string, string>(); productAttrs.Add ("Att1", "Value1"); productAttrs.Add ("Att2", "Value2"); productAttrs.Add ("Att3", "Value3"); //Create product AdBrixRm.AdBrixRmCommerceProductModel productModel = AdBrixRm.AdBrixRmCommerceProductModel.create ( "productId01", "productName01", 10000.00, 1, 5000.00, AdBrixRmAOS.AdBrixRm.Currency.KR_KRW, AdBrixRm.AdBrixRmCommerceProductCategoryModel.create ("Cate1", "Cate2", "Cate3"), AdBrixRm.AdBrixRmCommerceProductAttrModel.create (productAttrs) ); //Add to wishlist event AdBrixRm.commerceAddToWishList (productModel); }
View an Order
You can analyze the event that users view an order for final review.
The following product and order related data are sent.
- order id : (required) Order ID
- product id : (required) Product ID
- product name : (required) Product Name
- price : (required) Product Price
- quantity : (required) Purchase Quantity
- discount : (optional) Discounted Amount
- currency string : (optional) Purchase Currency Unit
- category : (optional) Product Category
- product attr map : (optional) Product Detail Option
- delivery charge : (optional) Delivery Charge
void sampleFunction() { //Arrange product list List<AdBrixRm.AdBrixRmCommerceProductModel> items = new List<AdBrixRm.AdBrixRmCommerceProductModel> (); //Create dictionary for product detail option Dictionary<string, string>productAttrs = new Dictionary<string, string>(); productAttrs.Add ("Att1", "Value1"); productAttrs.Add ("Att2", "Value2"); productAttrs.Add ("Att3", "Value3"); //Create product AdBrixRm.AdBrixRmCommerceProductModel productModel = AdBrixRm.AdBrixRmCommerceProductModel.create ( "productId01", "productName01", 10000.00, 1, 5000.00, AdBrixRmAOS.AdBrixRm.Currency.KR_KRW, AdBrixRm.AdBrixRmCommerceProductCategoryModel.create ("Cate1", "Cate2", "Cate3"), AdBrixRm.AdBrixRmCommerceProductAttrModel.create (productAttrs) ); items.Add (productModel); //View an order event AdBrixRm.commerceReviewOrder ("30290121", items, 1000.00, 3500.00); }
Cancel an Order / Refund
You can analyze the event that users cancel an order or claim a refund.
The following product and order related data are sent.
- order id : (required) Order ID
- product id : (required) Product ID
- product name : (required) Product Name
- price : (required) Product Price
- quantity : (required) Purchase Quantity
- discount : (optional) Discounted Amount
- currency string : (optional) Purchase Currency Unit
- category : (optional) Product Category
- product attr map : (optional) Product Detail Option
- penalty charge : (optional) Fee for the Cancel/ Refund
void sampleFunction() { //Arrange product list List<AdBrixRm.AdBrixRmCommerceProductModel> items = new List<AdBrixRm.AdBrixRmCommerceProductModel> (); //Create dictionary for product detail option Dictionary<string, string>productAttrs = new Dictionary<string, string>(); productAttrs.Add ("Att1", "Value1"); productAttrs.Add ("Att2", "Value2"); productAttrs.Add ("Att3", "Value3"); //Create product AdBrixRm.AdBrixRmCommerceProductModel productModel = AdBrixRm.AdBrixRmCommerceProductModel.create ( "productId01", "productName01", 10000.00, 1, 5000.00, AdBrixRmAOS.AdBrixRm.Currency.KR_KRW, AdBrixRm.AdBrixRmCommerceProductCategoryModel.create ("Cate1", "Cate2", "Cate3"), AdBrixRm.AdBrixRmCommerceProductAttrModel.create (productAttrs) ); items.Add (productModel); //Order cancelling event AdBrixRm.commerceRefund ("30290121", items, 3500.00); }
Search a Product
You can analyze the event that users search a product
The following product-related data included in the search result are sent.
- keyword : (required) Word used to search a product
- product id : (required) Product ID
- product name : (required) Product Name
- price : (required) Product Price
- quantity : (required) Purchase Quantity
- discount : (optional) Discounted Amount
- currency string : (optional) Purchase Currency Unit
- category : (optional) Product Category
void sampleFunction() { //Arrange product list List<AdBrixRm.AdBrixRmCommerceProductModel> items = new List<AdBrixRm.AdBrixRmCommerceProductModel> (); //Create dictionary for product detail option Dictionary<string, string>productAttrs = new Dictionary<string, string>(); productAttrs.Add ("Att1", "Value1"); productAttrs.Add ("Att2", "Value2"); productAttrs.Add ("Att3", "Value3"); //Create product AdBrixRm.AdBrixRmCommerceProductModel productModel = AdBrixRm.AdBrixRmCommerceProductModel.create ( "productId01", "productName01", 10000.00, 1, 5000.00, AdBrixRmAOS.AdBrixRm.Currency.KR_KRW, AdBrixRm.AdBrixRmCommerceProductCategoryModel.create ("Cate1", "Cate2", "Cate3"), AdBrixRm.AdBrixRmCommerceProductAttrModel.create (productAttrs) ); items.Add (productModel); //Product search event AdBrixRm.commerceSearch(items, "Nike"); }
Share a Product
You can analyze the event that users share a product.
The following shared-product data are sent.
- product id : (required) Product ID
- product name : (required) Product Name
- price : (required) Product Price
- quantity : (required) Purchase Quantity
- discount : (optional) Discounted Amount
- currency string : (optional) Purchase Currency Unit
- category : (optional) Product Category
- product attr map : (optional) Product Detail Option
void sampleFunction() { //Create dictionary for product detail option Dictionary<string, string>productAttrs = new Dictionary<string, string>(); productAttrs.Add ("Att1", "Value1"); productAttrs.Add ("Att2", "Value2"); productAttrs.Add ("Att3", "Value3"); //Create product AdBrixRm.AdBrixRmCommerceProductModel productModel = AdBrixRm.AdBrixRmCommerceProductModel.create ( "productId01", "productName01", 10000.00, 1, 5000.00, AdBrixRmAOS.AdBrixRm.Currency.KR_KRW, AdBrixRm.AdBrixRmCommerceProductCategoryModel.create ("Cate1", "Cate2", "Cate3"), AdBrixRm.AdBrixRmCommerceProductAttrModel.create (productAttrs) ); //Product sharing event AdBrixRm.commerceShare (AdBrixRm.SharingChannel.KAKAOTALK, productModel); }
View a Product List
You can analyze the event that users view a product list.
AdBrix SDK collects the following product list data.
- product id : (required) Product ID
- product name : (required) Product Name
- price : (required) Product Price
- quantity : (required) Purchase Quantity
- discount : (optional) Discounted Amount
- currency string : (optional) Purchase Currency Unit
- category : (optional) Product Category
- product attr map : (optional) Product Detail Option
void sampleFunction() { //Arrange product list List<AdBrixRm.AdBrixRmCommerceProductModel> items = new List<AdBrixRm.AdBrixRmCommerceProductModel> (); //Create dictionary for product detail option Dictionary<string, string>productAttrs = new Dictionary<string, string>(); productAttrs.Add ("Att1", "Value1"); productAttrs.Add ("Att2", "Value2"); productAttrs.Add ("Att3", "Value3"); //Create product AdBrixRm.AdBrixRmCommerceProductModel productModel = AdBrixRm.AdBrixRmCommerceProductModel.create ( "productId01", "productName01", 10000.00, 1, 5000.00, AdBrixRmAOS.AdBrixRm.Currency.KR_KRW, AdBrixRm.AdBrixRmCommerceProductCategoryModel.create ("Cate1", "Cate2", "Cate3"), AdBrixRm.AdBrixRmCommerceProductAttrModel.create (productAttrs) ); items.Add (productModel); //Product list viewing event AdBrixRm.commerceListView (items); }
View a Cart
You can analyze the event that users view carts.
AdBrix SDK collects the following data.
- product id : (required) Product ID
- product name : (required) Product Name
- price : (required) Product Price
- quantity : (required) Purchase Quantity
- discount : (optional) Discounted Amount
- currency string : (optional) Purchase Currency Unit
- category : (optional) Product Category
- product attr map : (optional) Product Detail Option
void sampleFunction() { //Arrange product list List<AdBrixRmCommerceProductModel> items = new List<AdBrixRmCommerceProductModel> (); //Create dictionary for product detail view Dictionary<string, string>productAttrs = new Dictionary<string, string>(); productAttrs.Add ("Att1", "Value1"); productAttrs.Add ("Att2", "Value2"); productAttrs.Add ("Att3", "Value3"); //Create product AdBrixRm.AdBrixRmCommerceProductModel productModel = AdBrixRm.AdBrixRmCommerceProductModel.create ( "productId01", "productName01", 10000.00, 1, 5000.00, AdBrixRmAOS.AdBrixRm.Currency.KR_KRW, AdBrixRm.AdBrixRmCommerceProductCategoryModel.create ("Cate1", "Cate2", "Cate3"), AdBrixRm.AdBrixRmCommerceProductAttrModel.create (productAttrs) ); items.Add (productModel); //Cart viewing event AdBrixRm.commerceCartView (items); }
Fill in Payment Information
You can analyze the event that users fill in payment information.
void sampleFunction() { //Create dictionary for payment information detail option Dictionary<string, object> paymentAttrs = new Dictionary<string, object>(); paymentAttrs.Add ("creditcard", "oocard"); AdBrixRm.commercePaymentInfoAdded (paymentAttrs); }
Gaming Event Analytics
You can analyze in-app events related to the game such as tutorial and stage.
AdBrix provides the following types of gaming event:
- Tutorial completion
- Character creation
- Stage cleared
- Level achieved
Tutorial Completion
You can analyze the event that users completed in-app tutorial .
Whether a user completes the tutorial or not is mandatory.
- (required) Check whether the completion is done with the skip button.
void sampleFunction() { AdBrixRm.gameTutorialCompleted (false); }
Character Creation
You can analyze the in-app event when users create characters.
void sampleFunction() { AdBrixRm.gameCharacterCreated(); }
Stage Cleared
You can analyze the in-app event when users clear stages.
The name of the cleared stage is mandatory.
- (required) Name of Cleared Stage
void sampleFunction() { AdBrixRm.gameStageCleared("1-1"); }
Level Achieved
You can analyze the in-app event that users achieved at certain levels.
Setting goal level is mandatory.
- (required) Level Achieved (1~10000)
void sampleFunction() { AdBrixRm.gameLevelAchieved (15); }