The Swrve SDK sends events in batch to save bandwidth and decrease the amount of requests needed to send details to Swrve. If you’re seeing errors in logs regarding these batch events, these batch events are being rejected by Swrve.
Previously, the main cause of rejected batch events was virtual currencies either not set up or set up incorrectly in Swrve. Now, missing or incorrect events are ignored and return an error event called Swrve.error.invalid_currency. To view the event details, on the Analytics menu, select Events, and then expand the Swrve event name tree to view error, invalid_currency. This displays a count of the number of times the event was sent:
The Swrve.error.invalid_currency event also displays on the QA User Logging screen.
You can check the virtual currencies for your app on the App Settings screen. To view app currencies, on the Settings menu, select App settings. If the app currencies are set correctly in Swrve (that is, they must be entered exactly as they have been set up in the app, including capitalization), then batch events containing any purchase events should not be rejected and you should not receive the Swrve.error.invalid_currency event. For more information on setting up app currencies, see Add your app.
If there are still issues, check the following:
- API Key – Is this set in your iOS, Unity or Android SDK? Ensure you include the correct API whether you’re trying to use your sandbox or production environment.
- User ID – Is the User ID being sent to Swrve and is it unique for each device?
- Session Token – The Swrve SDK handles session tokens automatically, but if you’re using the Swrve REST API, follow the steps in the Session token documentation to instrument the session token.
If none of the changes above seem to affect your batch event errors, contact the Swrve Customer Success team at email@example.com, so that a team member can review the logs for a specific title. Include the following details in the request:
- Swrve SDK version being used, if any.
- Whether the issue is occurring on your production or sandbox environment.
- Whether this has occurred following a new update or whether it has occurred without any changes to your app code.
With this information, the Customer Success team can identify any issues as quickly as possible.