Adopture Docs
SDKsReact Native

User Identification

Identify users while preserving privacy with the Adopture React Native SDK.

Hashed Identifiers

By default, the SDK generates privacy-preserving device identifiers using rotating hashes. No raw device IDs ever leave the device.

The SDK creates three hash types automatically:

HashRotationPurpose
Daily hashEvery dayDAU (Daily Active Users) counting
Monthly hashEvery monthMAU (Monthly Active Users) + retention
Retention hashEvery quarter90-day retention buckets

Each hash is computed as SHA256(device_id + app_key + date_salt). The salt changes based on the rotation period, ensuring identifiers cannot be linked across periods.

Custom User ID

Associate a known user identity (e.g. after login):

With hooks

import { useIdentify } from '@adopture/react-native/react';

function LoginScreen() {
  const identify = useIdentify();

  const handleLogin = async (userId: string) => {
    await identify(userId);
  };

  return <Button title="Log In" onPress={() => handleLogin('user-123')} />;
}

Imperative

await Adopture.identify('user-123');

The user ID is persisted across app restarts. When hashUserIds is enabled (default), the ID is hashed with SHA256(userId + appKey) before being sent to the server.

Logout

Clear the user identity when the user logs out:

await Adopture.logout();

This removes the stored user ID but preserves the session and event queue. The SDK continues tracking with anonymous hashed identifiers.

Full Reset

To clear everything — user identity, event queue, and session:

await Adopture.reset();

This is useful for completely resetting the SDK state, for example when switching accounts.

Privacy by Design

Adopture never collects or transmits personally identifiable information (PII):

  • Device IDs are hashed daily with rotating salts — raw IDs never leave the device
  • User IDs are hashed with SHA-256 by default
  • No cookies, no fingerprinting, no advertising identifiers
  • All data is associated with anonymous, rotating hashes
  • GDPR-friendly by design

On this page