Each Leanplum app you create will have a Production key and a Development key. You'll use these keys to keep your QA data and production data separate within the same Leanplum app. (You'll also use these keys when working with our API methods.)
To find your API keys, navigate to App Settings to see your app list. Either click your name in the upper right corner or click Manage Apps from the App list.
Then, click Keys & Settings next to the app you want to view API keys for.
When you implement the Leanplum SDK, you can switch between development and production mode by running a build of your app with either the development or production API key in place.
The Production key is designed to handle real users in production. Leanplum processes data from production mode in batches for efficiency.
Production mode is best for:
- Releasing an update of your app to the app store
- Tracking real user activity in Analytics when your app is live and in production
Never use a development key in a production/live build. Our development key uses an open socket (for real-time analytics), which could noticeably degrade your app's performance. Additionally, any user data will be lost as it is not captured in analytics.
Most of your team's testing will be done in Development mode. Development mode sends user data to Leanplum in real time, allowing your team to preview events, messages, and other Leanplum content immediately.
The Development key is used to:
- Send data to the development/test pipeline (via an open web socket in real-time)
- Log processes in the debugger for validation
- See and register your test devices in the dashboard
- Force your device into specific A/B test variants
- Keep your test data separate from the live users (instead it will show up in the Developer Activity section)
- Update custom templates and variables to the content management system
Development mode keeps your team's user activity out of Analytics. This allows you to try things out in Leanplum without worrying about polluting your actual user data in Analytics. You can view your team's testing activity in the "Developer Activity" section of analytics.
API calls with the devMode=true flag will be rate limited to 1 QPS
When this limit is exceeded, the API will return an HTTP 429 error and SDK will return a 408.
Below you can see how different features in Leanplum work when using the Production vs. Development keys:
Leanplum Data (usage info, event data, etc.)
Sent in real time over a web-socket connection.
Batched locally for efficiency and sent on App Background, App Close, or every 15 minutes of activity (Whichever comes first).
Visible through the "Devices" tab while the app is running. Allows preview of all types of messages, syncing of variables and custom In-App Message Template(s).
Can only found through the "Users" tab. Allows preview of of server side sends (Yes email and push, not In-App Messages or App Inbox).
Activity sent to "Developer Analytics" which is excluded from normal Analytics.
Data sent to normal Analytics (ingested on average every 2 hrs).
Analytics (Event Parameters)
Available for devs to view in the debugger.
Fully available to group/cohort in the dashboard.
Most of your QA/dev team's testing can be done in development mode, but you may want your team to be able to test in Production mode as well. We often recommend creating a separate test environment so that your team can use development and production mode freely, without making changes to your actual production app.
See Setting up a staging app for more info.
Updated 2 months ago