Super Properties
Attach persistent properties to every event with the Adopture React Native SDK.
Super properties are key-value pairs that are automatically attached to every event. Use them for values that rarely change, like the app variant or user tier.
Register Properties
await Adopture.registerSuperProperties({
app_variant: 'premium',
build: 'production',
});These properties are included with every subsequent track, screen, and revenue event. If a key already exists, it is overwritten.
Register Once
Set properties only if they haven't been set before:
await Adopture.registerSuperPropertiesOnce({
first_open_date: new Date().toISOString(),
});This is useful for values that should only be recorded once, like the first open date or install source.
Remove a Property
await Adopture.unregisterSuperProperty('build');Clear All Properties
await Adopture.clearSuperProperties();Read Current Properties
const props = Adopture.superProperties;
// { app_variant: 'premium' }Persistence
Super properties are persisted to AsyncStorage (key: @adopture/super_properties) and survive app restarts. They are loaded automatically when the SDK initializes.
Priority
If an event-level property has the same key as a super property, the event-level property takes precedence:
await Adopture.registerSuperProperties({ source: 'organic' });
// This event will have source: 'campaign', not 'organic'
Adopture.track('signup', { source: 'campaign' });