Dynamic Configuration

Some Amplitude SDK versions (iOS 5.3.0+, Android 2.28.0+, JavaScript 8.9.0+, React Native, Unity, and Flutter) let you set your apps to use dynamic configuration.

Dynamic configuration finds the best Amplitude server URL based on app users' location.

Considerations

  • If you have your own proxy server and use setServerUrl API, don't use dynamic configuration.
  • If you have users in Mainland China, Amplitude recommends that you use dynamic configuration.
  • By default, this feature is off. You must explicitly enable it to use it.

Use cases

Region-based

Send users from different regions to the server for their region.

Dynamic configuration chart

Dynamically adjust server URLs

If a server URL becomes unreachable for some reason, Amplitude can change the address in the dynamic configuration server.

This makes the ingestion endpoint dynamic, so you don't need to release a new version of your app.

Dynamic configuration chart

Usage

Enable the useDynamicConfig flag.

1[Amplitude instance].useDynamicConfig = YES;

1AmplitudeClient.getInstance().setUseDynamicConfig(true);

1Amplitude.getInstance().setUseDynamicConfig(true);

1amplitude.getInstance().init(euApiKey, null, {
2 useDynamicConfig: true,
3});

1Amplitude.getInstance().setUseDynamicConfig(true);

1amplitude.setUseDynamicConfig(true);

Was this page helpful?

Thanks for your feedback!

May 7th, 2024

Need help? Contact Support

Visit Amplitude.com

Have a look at the Amplitude Blog

Learn more at Amplitude Academy

© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.