If you want to make a change to the first view of your app, without taking mitigation steps it's possible Apptimize is not able to download the necessary resources in time and will instead present the default view to new users, and the cached configuration from the previous session to returning users.
If the change you're making applies to existing users then this may not pose an issue, as although users might miss a change that was made upon their first session returning to the app, in subsequent sessions they will have the proper configuration.
If the only opportunity to participate in an experiment is when first-time users launch the app for the very first time (such as with an onboarding experiment), then this can result in an extremely low participation rate. If users do not receive the experiment information in time, Apptimize will not enter them into an experiment. To ensure that users are able to participate in time, simply introduce a small delay to the app's start-up process using the following APIs:
For iOS:
There are 3 options for setting a delay in iOS. You could use any of these 3 options to set a delay until Apptimize configuration data (aka metadata) is downloaded.
- ApptimizeDelayUntilTestsAreAvailable: This option allows you to delay the initialization of Apptimize while the initial experiment configuration file is fetched, up to a maximum value of milliseconds specified in your Info.plist file. This is the preferred method for setting a delay for visual experiments.
- Use the waitForTestToBecomeAvailable API call on the loading screen or App Delegate (please use this method on the main thread only). This is the preferred method for setting a delay in dynamic variable or code block experiments.
- Use ApptimizeUpdateMetadataTimeoutOption in runTest function for a code block experiment.
For Android:
Use the setUpdateMetadataTimeout in ApptimizeOptions during initialization to set a delay in Android.
This delay sets a maximum time for your app to wait for Apptimize data to be loaded onto the device. For example if it is set to 800 milliseconds, your app will wait at most 800 milliseconds for Apptimize data. If the data is downloaded before this set time is reached, then Apptimize proceeds with other initialization steps and does not wait any further.
We recommend an 800 millisecond delay for experiments without heavy resources (e.g. images). If your experiment does include images to be shown as soon as the app opens, we recommend also factoring in how long it might take to download those resources.
Note: If you wish to ensure that even users returning to the app are receiving the latest configuration prior to being presented with the first screen, please see this FAQ.
Comments
0 comments
Please sign in to leave a comment.