跳到內容

Apptimize

Apptimize是一個手機應用程序測試和成長的平台,讓客戶快速迭代整個軟件開發過程。manbetx万博全站客户端

Apptimize可用於結合釺來補充你的成長市場營銷/ CRM策略與產品用戶界麵測試同步實驗和數據在兩個平台上。

用例

釺和Apptimize在一起,您可以利用兩個平台一起創造了強大的端到端經曆:

  • 為自定義同步應用內和CRM營銷經驗推廣。
  • 測試一個新的Apptimize新員工培訓經驗,並使用釺培養用戶在整個新流。
  • 並發測試產品功能配置與相應的用戶信息。
  • 裁縫應用經驗和適當的消息為不同領域的終端用戶。

它是如何工作的

銅焊和Apptimize可以集成在一起從SDK SDK傳遞數據。可以同步活躍Apptimize A / B測試組釺,允許您gdp8 %的用戶在一個特定的Apptimize測試釺通過內推,電子郵件,或應用程序消息。

我們集成代碼示例演示了如何權力釺和Apptimize sdk可以傳遞數據定製定位和分割在基於Apptimize釺實驗數據。

這個示例集成將在用戶的自定義屬性釺以下Apptimize數據的用戶配置文件:

  • 活性實驗的完整列表,用戶目前正在參與。
  • 實驗的完整列表用戶沒有參加,包括完成實驗。
  • 變體(s)用戶參與作為一個實驗的一部分。

功能標誌被認為是實驗,唯一的變量是功能標誌。如果特征標誌是關閉的,沒有數據將被報告。

此外,這種集成將日誌釺第一參與定製事件事件的一個實驗。這可以通過兩種方式:

  • 生成一個定製事件與屬性數據表示實驗名稱、實驗ID, ID變量名稱和變體。您可以通過實時觸發gdp8 %用戶使用銅焊的基於動作的交付活動和畫布。使用這些屬性來確定確切的Apptimize實驗要觸發的。
  • 與條目屬性數組生成每一個參與。每個參與的experiment_id_EXPERIMENT_ID: variant_id_VARIANT_ID: experiment_name_EXPERIMENT_NAME: variant_name_VARIANT_NAME

然後,您可以使用釺基於動作傳遞運動或畫布實時向用戶發送後續消息當這些事件被觸發。

集成

iOS

為了與你的應用集成,導入以下Appboy-Apptimize.mApptimize-Appboy.h文件到你的Xcode項目,導入Appboy-Apptimize.h頭AppDelegate實現,並添加以下didFinishLaunchingWithOptions初始化後Appboy和Apptimize:


          
1
(ApptimizeAppboysetupExperimentTracking];

Appboy-Apptimize.h:


          
1 2 3 4 5 6 7 8 9 10
/ / Apptimize-Appboy.h的ifndef Apptimize_Appboy_h #定義Apptimize_Appboy_h@ interfaceApptimizeAppboy:NSObject+(無效)setupExperimentTracking;@end# endif/ * Apptimize_Appboy_h * /

Appboy-Apptimize.m:


          
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17日18 19 20 21日22日23日24日25日26日27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
/ / Apptimize-Appboy.m#進口<基金會/ Foundation.h >#進口“Apptimize-Appboy.h”# < Apptimize / Apptimize進口。進口h > # < Apptimize / Apptimize + Variables.h ># Appboy進口”。h ABKUser.h“#進口/ /關鍵存儲之前入學字典核對是否招生已經改變了NSString*常量ApptimizeAppboyTestEnrollmentStorageKey=@“ApptimizeAppboyTestEnrollmentStorageKey”;@ implementationApptimizeAppboy+(無效)setupExperimentTracking{/ /跟蹤負責招生的變化[[NSNotificationCenterdefaultCenter]addObserver:自我選擇器:@ selector(apptimizeTestsProcessed:)名稱:ApptimizeTestsProcessedNotification對象:];/ /參與事件的跟蹤[[NSNotificationCenterdefaultCenter]addObserver:自我選擇器:@ selector(experimentDidGetViewed:)名稱:ApptimizeTestRunNotification對象:];}+(無效)apptimizeTestsProcessed:(NSNotification*)通知{NSLog(@“Appboy-Apptimize集成處理新Apptimize測試”);(自我updateForNewTests];}+(無效)updateForNewTests{NSDictionary*savedEnrollmentDictionary=[[NSUserDefaultsstandardUserDefaults]objectForKey:ApptimizeAppboyTestEnrollmentStorageKey];NSDictionary*currentEnrollmentDictionary=(自我getEnrollmentDictionaryFromTestInfo];BOOLenrollmentChanged=沒有;(id關鍵currentEnrollmentDictionary){如果(!(savedEnrollmentDictionary(關鍵]isEqualToString:currentEnrollmentDictionary(關鍵]]){enrollmentChanged=是的;NSString*testAttributeKey=(@“apptimize_test_”stringByAppendingString:關鍵];[[AppboysharedInstance]。用戶addToCustomAttributeArrayWithKey:testAttributeKeyvalue:currentEnrollmentDictionary(關鍵]];}}如果(currentEnrollmentDictionary! =savedEnrollmentDictionary){enrollmentChanged=是的;}如果(enrollmentChanged){[[AppboysharedInstance]。用戶setCustomAttributeArrayWithKey:@“active_apptimize_tests”數組:currentEnrollmentDictionaryallKeys];(id關鍵currentEnrollmentDictionaryallKeys){[[AppboysharedInstance]。用戶addToCustomAttributeArrayWithKey:@“all_apptimize_tests”價值:關鍵];}[[NSUserDefaultsstandardUserDefaults]setObject:currentEnrollmentDictionaryforKey:ApptimizeAppboyTestEnrollmentStorageKey];[[NSUserDefaultsstandardUserDefaults]同步];}}/ /字典變體ID鍵通過測試ID,既是nsstring+(稱為unaryoperations*)getEnrollmentDictionaryFromTestInfo{稱為unaryoperations*enrollmentDictionary=(稱為unaryoperations字典];(id關鍵(ApptimizetestInfo]){NSLog(@“關鍵= % % @ @ value = ",關鍵,[[ApptimizetestInfo]objectForKey:關鍵]);NSDictionary<ApptimizeTestInfo>*testInfo=[[ApptimizetestInfo]objectForKey:關鍵];enrollmentDictionary[[testInfotestIDstringValue]]=(testInfoenrolledVariantIDstringValue];}返回enrollmentDictionary;}+(無效)experimentDidGetViewed:(NSNotification*)通知{如果(!(通知用戶信息(ApptimizeTestFirstRunUserInfoKey]boolValue]){返回;}/ / Apptimize不通知id,我們遍曆所有實驗來找到匹配的。NSString*的名字=通知用戶信息(ApptimizeTestNameUserInfoKey];NSString*變體=通知用戶信息(ApptimizeVariantNameUserInfoKey];[[ApptimizetestInfo]block:^(id關鍵,id<ApptimizeTestInfo>實驗,BOOL*停止){BOOL匹配=(實驗testNameisEqualToString:的名字]& &(實驗enrolledVariantNameisEqualToString:變體];如果(!匹配){返回;}/ /如果你想記錄一個定製事件的參與[[AppboysharedInstance]logCustomEvent:@“apptimize_experiment_viewed”withProperties:@ {@“apptimize_experiment_name”:(實驗testName),@“apptimize_variant_name”:(實驗enrolledVariantName),@“apptimize_experiment_id”:(實驗testID),@“apptimize_variant_id”:(實驗enrolledVariantID)});/ /如果你想自定義屬性數組設置為每個參與[[AppboysharedInstance]。用戶addToCustomAttributeArrayWithKey:@“apptimize_experiments”值:(NSStringstringWithFormat:% @:@”experiment_id_ variant_id_ % @: experiment_name_ % @: variant_name_ % @”,(實驗testID),(實驗enrolledVariantID),(實驗testName),(實驗enrolledVariantName]]];*停止=是的;});}@end

安卓

導入apptimizeappboy.java類到您的應用程序和在你的主活動實現,創建一個私有成員appboyApptimizeIntegration:


          
1
私人ApptimizeAppboyappboyApptimizeIntegration;

然後在onCreate方法中,初始化釺和Apptimize:


          
1 2
appboyApptimizeIntegration=ApptimizeAppboy();appboyApptimizeIntegrationconfigureExperimentTracking();

ApptimizeAppboy.java:


          
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17日18 19 20 21日22日23日24日25日26日27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
com.apptimize.appboykit;進口java.io.File;進口java.io.FileInputStream;進口java.io.FileOutputStream;進口java.io.ObjectInputStream;進口java.io.ObjectOutputStream;進口java.util.Map;進口java.util.HashMap;進口android.util.Log;進口android.content.Context;進口com.apptimize.Apptimize;進口com.apptimize.ApptimizeTestInfo;進口com.apptimize.Apptimize.OnExperimentsProcessedListener;進口com.apptimize.Apptimize.OnExperimentRunListener;進口com.appboy.Appboy;進口com.appboy.AppboyUser;進口com.appboy.models.outgoing.AppboyProperties;公共ApptimizeAppboy實現了ApptimizeOnExperimentRunListener,ApptimizeOnExperimentsProcessedListener{公共無效configureExperimentTracking(上下文上下文){appboyInstance=getInstance(上下文);enrollmentStorage=文件(上下文getDir(“apptimize-appboy”,上下文MODE_PRIVATE),ApptimizeAppboyTestEnrollmentStorage);ApptimizesetOnExperimentRunListener();ApptimizeaddOnExperimentsProcessedListener();}@Override公共無效onExperimentRun(字符串experimentName,字符串variantName,布爾firstRun){如果(!firstRun){返回;}地圖<字符串,ApptimizeTestInfo>testInfoMap=ApptimizegetTestInfo();如果(testInfoMap= =){返回;}字符串experimentId=”“;字符串variantId=”“;日誌d(“Apptimize-Appboy”,“在onExperimentRun”);(ApptimizeTestInfotestInfo:testInfoMap()){如果(testInfogetTestName()。=(experimentName)& &testInfogetEnrolledVariantName()。=(variantName)){experimentId=字符串返回對象的值(testInfogetTestId());variantId=字符串返回對象的值(testInfogetEnrolledVariantId());}}日誌d(“Apptimize-Appboy”,“日誌記錄參與“+experimentName+”:“+experimentId+”和變體”+variantName+”:“+variantId);/ /如果你想記錄一個定製事件的參與logParticipationEventAsEvent(experimentName,variantName,experimentId,variantId);/ /如果你想自定義屬性數組設置為每個參與logParticipationEventAsAttributes(experimentName,variantName,experimentId,variantId);}私人無效logParticipationEventAsEvent(字符串experimentName,字符串variantName,字符串experimentId,字符串variantId){AppboyPropertieseventProperties=AppboyProperties();eventPropertiesaddProperty(“apptimize_experiment_name”,experimentName);eventPropertiesaddProperty(“apptimize_variant_name”,variantName);eventPropertiesaddProperty(“apptimize_experiment_id”,experimentId);eventPropertiesaddProperty(“apptimize_variant_id”,variantId);appboyInstancelogCustomEvent(“apptimize_experiment_viewed”,eventProperties);}私人無效logParticipationEventAsAttributes(字符串experimentName,字符串variantName,字符串experimentId,字符串variantId){appboyInstancegetCurrentUser()。addToCustomAttributeArray(“apptimize_experiments”,“experiment_id_”+experimentId+”:variant_id_”+variantId+”:experiment_name_”+experimentName+”:variant_name_”+variantName);}@Override公共無效onExperimentsProcessed(){地圖<字符串,字符串>currentEnrollmentDictionary=getEnrollmentDictionary();地圖<字符串,字符串>savedEnrollmentDictionary=getPreviousEnrollmentDictionary();AppboyUserappboyUser=appboyInstancegetCurrentUser();布爾enrollmentChanged=;日誌d(“Apptimize-Appboy”,“處理實驗”);(字符串關鍵:currentEnrollmentDictionary鍵盤()){如果(savedEnrollmentDictionary= =| |!currentEnrollmentDictionary得到(關鍵)。=(savedEnrollmentDictionary得到(關鍵))){日誌d(“Apptimize-Appboy”,“發現改變登記”+currentEnrollmentDictionary得到(關鍵));enrollmentChanged=真正的;字符串testAttributeKey=“apptimize_test_”+關鍵;appboyUseraddToCustomAttributeArray(testAttributeKey,currentEnrollmentDictionary得到(關鍵));}}如果(currentEnrollmentDictionary大小()= =0& &savedEnrollmentDictionary大小()! =0){enrollmentChanged=真正的;}如果(enrollmentChanged){日誌d(“Apptimize-Appboy”,“入學改變”);appboyUsersetCustomAttributeArray(“active_apptimize_tests”,currentEnrollmentDictionary鍵盤()。toArray(字符串(0)));(字符串關鍵:currentEnrollmentDictionary鍵盤()){appboyUseraddToCustomAttributeArray(“all_apptimize_tests”,關鍵);}storePreviousEnrollmentDictionary(currentEnrollmentDictionary);}}私人地圖<字符串,字符串>getEnrollmentDictionary(){地圖<字符串,字符串>招生=HashMap<字符串,字符串> ();地圖<字符串,ApptimizeTestInfo>testInfoMap=ApptimizegetTestInfo();(ApptimizeTestInfotestInfo:testInfoMap()){日誌d(“Apptimize-Appboy”,”TestID:“+字符串返回對象的值(testInfogetTestId())+”VariantID:“+字符串返回對象的值(testInfogetEnrolledVariantId()));招生(字符串返回對象的值(testInfogetTestId()),字符串返回對象的值(testInfogetEnrolledVariantId()));}返回招生;}私人地圖<字符串,字符串>getPreviousEnrollmentDictionary(){ObjectInputStreamenrollmentStream;試一試{enrollmentStream=ObjectInputStream(FileInputStream(enrollmentStorage));}(異常e){日誌d(“Apptimize-Appboy”,“無法打開文件”);返回;}地圖<字符串,字符串>previousEnrollment;試一試{previousEnrollment=(地圖<字符串,字符串>)enrollmentStreamreadObject();}(異常e){日誌d(“Apptimize-Appboy”,“以前無法獲得登記”);返回;}返回previousEnrollment;}私人無效storePreviousEnrollmentDictionary(地圖<字符串,字符串>enrollmentDictionary){試一試{ObjectOutputStreamenrollmentStream=ObjectOutputStream(FileOutputStream(enrollmentStorage));enrollmentStreamwriteObject(enrollmentDictionary);enrollmentStream衝洗();enrollmentStream關閉();}(異常e){日誌d(“Apptimize-Appboy”,“無法保存注冊信息”);}}私人AppboyappboyInstance;私人文件enrollmentStorage;私人靜態字符串ApptimizeAppboyStorageDirectory;私人靜態字符串ApptimizeAppboyTestEnrollmentStorage=“ApptimizeAppboyTestEnrollmentStorage”;}
這個頁麵是有用嗎?
新東西!
Baidu
map