Skip to content

Counting monthly active users and enhancing the user experience

tkrami edited this page Jan 8, 2019 · 6 revisions

If you are using the mobile SDK for iOS or Android, you can safely skip this part, because the SDKs do all of this automatically. If you are using the API directly, keep reading!

This is very important! To monitor how many monthly active users are on a system, we generate a random token on the backend and send it back to the client. On each and every response you get form the API, there is a chance that you will get a so called Ephemeral Id in the header X-Ephemeral-Id. If you got one, save it to your client, ideally in a place where it survives closing the app, or browser and also reboots, and from now on send it back in the same header on every request you make. Also keep in mind that this id could change, so the best way to deal with this is, to simply look at every response and if it has the header set, save the value (or override the existing one) and send this new value on every request you make from now in the same header field. This is not only used to count MAUs, but also for features like personalized recommendations and ContextIntelligence. If we detect solutions that do not do this, we will deactivate them, because this would pollute the Analytics data of this customer and it also destroys the user experience, because some features this to work properly.

Example Request

curl -X GET -H "Content-Type: application/json" -H "Apikey:YOUR-API-KEY" -H 'x-ephemeral-id: 123abc' ""