Use AwesomeCordovaPluginReteno service methods.
Set User Attributes (identified user)
await this.reteno.setUserAttributes({
externalUserId: 'USER_ID',
user: {
userAttributes: {
email: '[email protected]',
phone: '+1234567890',
firstName: 'John',
lastName: 'Doe',
languageCode: 'en',
timeZone: 'Europe/Kyiv',
marketId: 'market_1',
address: {
region: 'Kyivska',
town: 'Kyiv',
address: 'Khreshchatyk St, 1',
postcode: '01001',
},
fields: [{ key: 'plan', value: 'premium' }],
},
subscriptionKeys: ['news', 'promotions'],
groupNamesInclude: ['beta-testers'],
groupNamesExclude: ['unsubscribed'],
},
});Set Anonymous User Attributes
await this.reteno.setAnonymousUserAttributes({
firstName: 'John',
lastName: 'Doe',
languageCode: 'en',
timeZone: 'Europe/Kyiv',
marketId: 'market_1',
address: {
region: 'Kyivska',
town: 'Kyiv',
address: 'Khreshchatyk St, 1',
postcode: '01001',
},
fields: [{ key: 'utm_source', value: 'google' }],
});Anonymous attributes cannot include phone or email.
Multi-account Mode
await this.reteno.setMultiAccountUserAttributes({
externalUserId: 'user-123',
user: {
userAttributes: {
email: '[email protected]',
firstName: 'John',
lastName: 'Doe',
marketId: 'market_1',
},
},
});Market ID
marketId requires [email protected]. The
[email protected] wrapper includes its TypeScript declaration. It is
supported by setUserAttributes, setAnonymousUserAttributes, and
setMultiAccountUserAttributes.
- The value can contain up to 64 Latin letters, digits, hyphens (
-), and underscores (_). - Pass an empty string to clear the existing value:
await this.reteno.setUserAttributes({
externalUserId: 'USER_ID',
user: {
userAttributes: {
marketId: '',
},
},
});- Omit
marketIdto keep the existing value unchanged. - The feature requires Reteno Android SDK 2.9.5+ or Reteno iOS SDK 2.7.1+. These versions are included in
[email protected].
Notes
languageCode: RFC 5646 (example:de-AT)timeZone: TZ database value (example:Europe/Kyiv)