Setting Up For Testing, QA, and Production
In this section, you will learn how to maintain data integrity and how to keep your testing, QA, and production data separate. If you have not done so already, read Setting Up Users and User Permissions to learn how to set up applications and users.
In the majority of cases, you’ll want to keep your QA and production data separate. As such, we recommend that you create separate applications for testing, QA, and production in the Kontagent system. Doing so will allow you to test your code, see what your data will look like in the Kontagent Dashboard, and determine what works for you without influencing your production data. In addition, we also provide you with a Test Server, in which you can first test your application instrumentation.
Recommended Setup Process
Create QA and Production Apps
Login to your Kontagent account and create 2 application instances. If you have forgotten how to create an application, refer to the Adding An Application section here. Create one application instance for QA and one for production, such as the following:
- MyApp - QA
- MyApp - Production
Each of these applications will have a unique API Key, which is automatically generated when the application is created. Make note of this API Key, as you will need it when instrumenting your application.
Testing Your Instrumentation
As you instrument events, you'll want to test your instrumentation by directing your application to send data to our Test Server. To send data to the Test Server using the REST API, simply point all API calls to the Test Server URL:
test-server.kontagent.com/api/v1/QA_APP_API_KEY/MESSAGE_TYPE/?PARAMETER=DATA
Once data is sent, you can run integration reports and receive immediate feedback on the validity of your instrumentation. Using these tools to validate your instrumentation will help ensure data integrity when data is sent to our production servers. Please note, the API Key being used should be from your QA application (MyApp - QA).
QA Your Test Data
Once you have validated your instrumentation with our Test Server and would like to view test data, change the URL in your QA application to send data to our Production Server URL:
api.geo.kontagent.net/api/v1/QA_APP_API_KEY/MESSAGE_TYPE/?PARAMETER=DATA
You can now view your QA data (by clicking on MyApp - QA) in the Kontagent Dashboard, and make sure your data is coming in the way you like.
Sending Your Production Data to Kontagent
During the testing of your instrumentation, you should have been using your QA application (MyApp - QA). When you are ready to send data to our production servers to view in your production application instance (MyApp - Production), simply change the URL and API Key to point to the Production Server and production application:
api.geo.kontagent.net/api/v1/PROD_APP_API_KEY/MESSAGE_TYPE/?PARAMETER=DATA
From this point on, you are live, and Kontagent will update your data on an hourly basis! To view your production data, click on MyApp - Production in the Kontagent Dashboard.