Apps

Measure your own Android or React Native app: installs, daily and monthly active installs, retention and funnels across sessions.

This is the optional product mode. It is for apps that you build and run yourself, and it is switched on per site by the site owner. A site in the default web mode keeps counting visitors from the address and browser, which cannot tell one phone from another across days.

1. Switch the site to product mode

Add a site for the app (any name you like, for example app.yourdomain.com), open it in the dashboard and use the App analytics (product mode) card: tick Product mode and save. You can also set it with PUT /api/app/sites/<domain>/product and {"mode":"product"}. The card also lets you choose how long the daily install counts are kept (default 400 days) and shows copy-paste setup code.

2. Add a client

Both clients are in the clients/ folder of the Gaugemint repository and have no third-party dependencies.

// Android (Kotlin)
Gaugemint.init(this, domain = "app.yourdomain.com", baseUrl = "https://guagemint.com")
Gaugemint.screen("Home")
Gaugemint.track("level_complete", mapOf("level" to 3))
// React Native / Expo (TypeScript)
import * as gm from '@gaugemint/react-native';
gm.init({ domain: 'app.yourdomain.com', baseUrl: 'https://guagemint.com', storage: AsyncStorage });
gm.screen('Home');
gm.track('level_complete', { level: 3 });

The client makes a random install id the first time it runs and keeps it in the app's private storage. It queues events while the phone is offline, sends them in batches and retries with backoff. It never blocks the interface and never throws.

3. Or call the API yourself

curl -X POST https://guagemint.com/api/event \
  -H 'Content-Type: application/json' \
  -d '{"domain":"app.yourdomain.com","name":"app_open","vid":"0123456789abcdef0123","platform":"android","app_version":"1.4.0"}'
FieldMeaning
vidThe install id: a UUID v4 or 16 to 32 random characters (A-Z a-z 0-9 _ -). Required in product mode. Make it with a secure random generator, keep it only in the app's private storage and let the user reset it. Never use a hardware, advertising or account id.
sessionOptional random id (8 to 40 characters) for one app launch.
app_version, build, os_versionOptional strings, up to 32 characters.
platformandroid, react-native, web or other.
timestampWhen the event happened (an offline queue keeps the real time). Not more than a day in the future.

POST /api/events takes an array of up to 50 events. A product site answers 429 with Retry-After when one install sends too fast.

What is stored

The server never stores the install id. It stores a keyed one-way hash of it that includes the site name, so the same install on two sites gives unrelated values. Per event it keeps that hash, the event name, the properties you send, the app version, build, platform, operating system version, the time, and the country, region and city looked up from the address. The address is then discarded and the user-agent string is not used. Never send typed text or personal data in event names or properties. The privacy page and section 2a of the privacy policy have the full list.

Opt-out and erase

Because the install id lasts, your app should give users a way out. Both clients provide an opt-out (stop sending, drop the queue, delete the id) and an erase request that deletes that install's events and daily rows on the server: POST /api/event with the name $erase and the same vid. Backups can hold deleted data for up to 35 days.

What you see

The App analytics tab of the site shows new and active installs, DAU, WAU and MAU with stickiness, a retention table (day 1, 3, 7, 14 and 30), a funnel builder that counts installs across sessions and days, top events with property breakdowns, app version, platform, operating system and country, and revenue per day. The same numbers are available at /api/v1/stats/product/overview, retention, events and funnel with an API key.

Limits to know

  • An install is an id, not a person or a store download. Reinstalling or clearing the app data makes a new install, and uninstalls are not visible.
  • Daily install counts are kept for the period you set (400 days by default); individual events, funnels and property breakdowns reach back 90 days.
  • Anyone who knows the site name can send events to it, as with web analytics. A per-install rate limit and your plan's monthly limit bound the effect.
  • iOS is not covered by a client yet; the API works from any platform.