@adobe/react-native-aepuserprofile

Adobe Experience Platform support for React Native apps.

Usage no npm install needed!

<script type="module">
  import adobeReactNativeAepuserprofile from 'https://cdn.skypack.dev/@adobe/react-native-aepuserprofile';
</script>

README

React Native AEP User Profile Extension

npm version npm downloads

Prerequisites

The UserProfile extension has the following peer dependency, which must be installed prior to installing the UserProfile extension:

Installation

See Requirements and Installation instructions on the main page

Usage

Initializing and registering the extension

Initializing the SDK should be done in native code, documentation on how to initialize the SDK can be found here.

User Profile

Importing the extension:

import {UserProfile} from '@adobe/react-native-aepuserprofile';

Getting the extension version:

UserProfile.extensionVersion().then(version => console.log("AdobeExperienceSDK: UserProfile version: " + version));

Update user attributes:

let attrMap = {"mapKey": "mapValue", "mapKey1": "mapValue1"};
UserProfile.updateUserAttributes(attrMap);

Remove user attributes:

UserProfile.removeUserAttributes(["mapKey1"]);

Get user attributes:

UserProfile.getUserAttributes(["mapKey", "mapKey1"]).then(map => console.log("AdobeExperienceSDK: UserProfile getUserAttributes: " + map));