question

frankaharper avatar image
frankaharper asked

How to implement AB test for multiple screens

I am trying to run an AB test that affects my whole app, and all of it's users. There are multiple goals (e.g. create account, create email alerts, etc..) What are the recommended approaches to creating AB tests that affect more than one screen?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

DougM@Amazon avatar image
DougM@Amazon answered
Hello Frank, If you look at our Android A/B Testing documentation, you should be initializing the AmazonInsights instance with the Android Application context via the getApplicaitonContext() method. As such, you should be able to get the use the optional code we show in : https://developer.amazon.com/public/apis/manage/ab-testing/doc/a-b-testing-for-android-fire-os#Integrate%20the%20SDK As the below code will allow you to get an already instantiated instance of the AmazonInsights client in subsequent activities. InsightsCredentials credentials = AmazonInsights.newCredentials("YOUR_PUBLIC_KEY", "YOUR_PRIVATE_KEY"); AmazonInsights originalInstance = AmazonInsights.getInstance(credentials);
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

frankaharper avatar image
frankaharper answered
Hi Doug, Thanks for the help! If I understand you correctly, conversion events will only be tracked if they are recorded by the same AmazonInsights instance? So if I have the following scenario the conversion would not count: 1. app launches and creates the AmazonInsights instance 2. app displays a notification and sends a view event 3. some a amount of time passes, and the app process is killed 4. user taps on notification 5. app launches and creates a new AmazonInsights instance 6. app sends a conversion event Is my understanding correct? If so, is there any way to work around this limitation?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Nick Gardner avatar image
Nick Gardner answered
Since the instance is cached by the service, doing another call to getInstance() with your key should actually result in the exact same instance being grabbed. Thus, you can grab that instance when the user clicks on the notification and use it to send back the variation, which should make everything apply to the same event. Thanks, Nick
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.