Guides and Surveys React Native SDK

Amplitude's Guides and Surveys SDK enables you to deploy Guides and Surveys on your website or application.

This SDK is in Open Beta

This feature is in open beta and under active development.

Requirements

The Guides and Surveys React Native SDK requires:

Install the SDK

Install the Guides and Surveys React Native SDK as a package with npm or Yarn.

npm install @amplitude/plugin-engagement-react-native
npm install @react-native-async-storage/async-storage

yarn add @amplitude/plugin-engagement-react-native
yarn add @react-native-async-storage/async-storage

Async storage

Explicitly adding @react-native-async-storage/async-storage ensures the native module links correctly, since the engagement native module uses it.

Run pod install in the ios directory.

cd ios
bundle exec pod install

Initialize the SDK

//index.js
import {Linking} from 'react-native';

import { init, add } from '@amplitude/analytics-react-native';
import { getPlugin, handleURL } from '@amplitude/plugin-engagement-react-native';

init('<<< YOUR API KEY HERE >>>'); 
add(getPlugin());

Linking.getInitialURL().then(async (url) => {
    if (url) {
    const didHandleURL = await handleURL(url);
    if (didHandleURL) { return; }

    // Handle a non-Amplitude SDK URL
    }
});

Linking.addEventListener('url', async ({ url }) => {
    const didHandleURL = await handleURL(url);
    if (didHandleURL) { return; }

    // Handle a non-Amplitude SDK URL
});

Use the same API key for Guides & Surveys and Analytics

To avoid analytics mismatches and ensure accurate data collection, use the same API key for both Guides & Surveys and your Analytics SDK. Both should reference the same Amplitude project. Using different API keys can cause:

  • The SDK to fetch guides and surveys from the wrong project
  • Analytics data to appear in different projects
  • Insights and survey responses are incomplete or mismatched

Make sure the API key you provide to Guides & Surveys matches the API key used to initialize your Amplitude Analytics SDK.

Note

At this point, you are technically done installing. While optional, Amplitude recommends that you set up URL handling for preview mode.

Element targeting

Pin and tooltip guides require the ability for the SDK to target specific views on screen. The Engagement SDK uses the "testID" property on an element in the React Native DOM.

In the example component below, "welcome-banner" is the element targeting string that should be used in the Guides and Surveys dashboard.

import React from 'react';
import { View, Text, StyleSheet } from 'react-native';

/**
 * A simple component with a testID that can be targeted
 * by the Amplitude Guides & Surveys SDK.
 */
export default function WelcomeBanner() {
  return (
    <View
      testID="welcome-banner"   // Element targeting via testID
      style={styles.banner}
    >
      <Text style={styles.bannerText}>
        Welcome to the App!
      </Text>
    </View>
  );
}

Configure linking

If your app doesn't have deep linking enabled, follow the React Native instructions to add support for deep linking. Previewing Guides and Surveys on a device requires this support.

Locate the mobile URL scheme

In Amplitude, navigate to your Project's settings.

On the General tab, locate the URL scheme (mobile) field. Copy its value, for example, amp-abc123.

Changelog

You can access the changelog here.

Was this page helpful?

November 20th, 2025

Need help? Contact Support

Visit Amplitude.com

Have a look at the Amplitude Blog

Learn more at Amplitude Academy

© 2025 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.