Providing more flexibility to Remote Config, you can now use your own custom client-side signals and conditions to personalize user app experiences without requiring app updates - Remote Config style.
Firebase Remote Config is a beloved product for good reason: it allows you to dynamically change the behavior and appearance of your app without requiring users to download app updates. This means effortlessly rolling out and testing new features, optimizing your app with A/B tests, and managing rollouts with ease.
While incredibly powerful, standard Remote Config signals have had some limitations. They relied on a predefined set of signals, and while effective, they couldn’t always meet the diverse needs of every developer, especially those already using other analytics solutions. Server-side Remote Config bridged some gaps, offering more flexibility, but it often required heavier server-side configurations for user segmentation and property attribution. It also didn’t readily support client-side-only signals or quick, lightweight Remote Config implementations based on simpler signal sets.
This is where client-side custom signal conditions come into play. This new feature allows you to leverage your own custom signals, ranging from simple, lightweight indicators to more robust third-party or homegrown analytics integrations. Plus, they can be combined with server-side signals for even greater control.
Let’s look at an example
Have you ever played a game that was so brutally difficult you almost rage-quit immediately? It’s a soul crushing feeling as a player, but now imagine you’re in the position of the game developer, and you’re losing new players to your game because you’re not able to set quite the right difficulty levels for players as they enter your game for the first time. What if you could fine-tune the challenge on the fly, offering a smoother onboarding for new players while still providing a robust experience for veterans?
With client-side custom signal conditions in Firebase Remote Config, this is not only possible but surprisingly quick and easy. This powerful new feature empowers you to dynamically adjust game parameters based on player behavior using client-side signals, creating a truly personalized and engaging experience for everyone.
Consider a scenario where you want to automatically adjust difficulty for players who are struggling with a particular level. How do you identify who needs help? A good metric could be the number of retries. If a player attempts a level three times without success, it’s a strong indication they could use a nudge - using Remote Config.
Setting this up with custom signal conditions is effortless. First, you define a custom signal condition called “Player Retries” and a matching signal parameter name called player_retries
. Then you define a Remote Config parameter called difficulty
whose value will be set according to conditional rules based on the “Player Retries” condition we created. For example, we can define a condition where if player_retries
is >= 3, we’ll set the difficulty
to easy
. Once this is set, we can automatically adjust the difficulty level with Remote Config based on whatever rules we specify - and can change that appropriately anytime we like from that point forward remotely.
Here’s what setting the player_retries
custom signal condition and the difficulty
parameter and conditional values in the console looks like:
And here’s how you can implement using this configuration in your code:
- First, track the player’s retry count and update the custom signal
// Player failed and retries again.
retry_count++;
var customSignals = new CustomSignals.Builder()
.put("player_retries", retry_count)
.build();
config.setCustomSignals(customSignals);
Note you’d need to make the above call to setCustomSignals
each time the player retries a level and the retry_count
is incremented.
- Set up a Config Update Listener
Next, set up a config update listener in your application. This listener will trigger the adjustDifficulty()
function whenever the player_retries >= 3
condition is triggered and a new value is set for the difficulty parameter, or when any other Remote Config parameter value is updated.
firebaseRemoteConfig.addOnConfigUpdateListener(new ConfigUpdateListener() {
@Override
public void onUpdate(ConfigUpdate configUpdate) {
if (configUpdate.getUpdatedKeys()
.contains("difficulty")) {
firebaseRemoteConfig.activate()
.addOnCompleteListener(new
OnCompleteListener<String>() {
@Override
public void onComplete(@NonNull Task<String> task) {
adjustDifficulty();
}
});
}
}
});
- Retrieve and act on the parameter
Finally, inside theadjustDifficulty()
function, retrieve the current value of thedifficulty
parameter from Remote Config and act accordingly:
private void adjustDifficulty() {
String difficulty = firebaseRemoteConfig.getString("difficulty");
// Set game settings based on retrieved difficulty value.
}
The flexibility of using custom signal conditions
The true power of custom signal conditions lies in their flexibility. You can use virtually any kind of signal in your apps or games to adjust and personalize experiences automatically. Going back to the example, you’re not limited to just retry counts but can use virtually any metric – time spent on a level, resources collected, enemies defeated, or any other relevant data – to trigger changes in your game’s configuration.
When to choose client-side custom signals
Remote Config offers a wide variety of standard signals out-of-the-box, and the integration with Google Analytics makes it possible to create sophisticated and comprehensive configurations to adjust your app experiences remotely. There might be times when custom signals can be the better choice for managing configurations. For instance, client-side custom signals are ideal if you aren’t already using Google Analytics and need a quick way to introduce client-side remote configuration into your app with a simple development workflow, providing an agile method to respond to user interactions. They’re also beneficial if you’re already using a different analytics solution and wish to integrate Remote Config with it.
Using custom signal conditions effectively
There are some best practices, limitations and other important things to be aware of when using custom signal conditions:
-
Use custom signal conditions when you need a quick client-side specific based solution to enhance user experiences and provide dynamic content.
-
Do not use custom signal conditions when for advanced capabilities like adjusting app behavior for different user segments, or collecting analytics data and analyzing performance between app experiences - for this use Remote Config with Google Analytics and user properties instead.
-
Do mix and match using custom signals alongside Remote Config with Google Analytics where it makes sense for your use cases.
-
Do not use custom signal conditions for sensitive application behavior or controls are involved - for this you should instead consider using server-side Remote Config.
-
Be aware that there are limits to how many custom signals can be configured.
-
Consider the lifecycle of a client-side custom signal: Given the limits on custom signals, you should ensure you’ve planned and implemented when to set, update and retrieve custom signals in your application, and unset unneeded custom signals in the console.
Try it out
Give client-side custom signal conditions in Remote Config a try today! You can follow the standard getting started instructions, but just use custom signal conditions as we’ve covered in this post instead of standard signals to create your first custom signal powered app experiences.
Happy coding!