React Native SDK reference
이 페이지는 아직 귀하의 언어로 번역되지 않았습니다. 현재 작업 중이므로 곧 다시 확인해 주십시오.
This reference documents every public export of @amplitude/analytics-react-native and every option you can pass to init(), verified against version 1.13.0. For options, go to Configuration options. To find the release that added a feature, go to the React Native SDK release notes.
import * as amplitude from "@amplitude/analytics-react-native";
The top-level functions act on a default instance. Each instance from createInstance() has the same methods.
Return values
Methods that do asynchronous work return AmplitudeReturn<T>, an object with one property, promise. Await promise, not the return value itself.
const result = await amplitude.track("Song Played").promise; // correct
const wrapper = await amplitude.track("Song Played"); // returns { promise }, not a Result
Tracking methods resolve to a Result after the upload attempt finishes:
| Property | Type | Description |
|---|---|---|
event | Event | The event as sent, after every plugin ran. |
code | number | The HTTP status code, or 0 when the SDK skipped the event. |
message | string | A description of the outcome, such as Event tracked successfully. |
For every code and message, go to Read the upload result.
Calls made before init() completes wait in a queue and run in order afterward. Their promises resolve after init() finishes and the upload completes.
Setup
init
Initializes the instance. Call it once per instance.
init(apiKey: string, userId?: string, options?: ReactNativeOptions): AmplitudeReturn<void>
| Parameter | Type | Description |
|---|---|---|
apiKey | string | Your Amplitude project API key. |
userId | string | Optional. User ID for this device. Pass undefined when you pass options without a user ID. |
options | ReactNativeOptions | Optional. Go to Configuration options. |
init() has no (apiKey, options) form. An object passed second becomes the user ID.
promise resolves after the SDK restores identity, installs plugins, and runs queued calls.
await amplitude.init("AMPLITUDE_API_KEY", "user-12345", {
serverZone: "EU",
}).promise;
createInstance
Creates an independent instance with its own configuration, identity, queue, and plugins. Use it to send data to more than one project.
createInstance(): ReactNativeClient
const secondary = amplitude.createInstance();
secondary.init("OTHER_API_KEY", undefined, { instanceName: "secondary" });
add
Adds a plugin. Go to Plugin.
add(plugin: Plugin): AmplitudeReturn<void>
amplitude.add({
name: "add-app-flavor",
execute: async (event) => {
event.event_properties = { ...event.event_properties, flavor: "beta" };
return event;
},
});
remove
Removes a plugin by name and runs its teardown().
remove(pluginName: string): AmplitudeReturn<void>
amplitude.remove("add-app-flavor");
flush
Sends every queued event now. A manual flush doesn't retry failures.
flush(): AmplitudeReturn<void>
await amplitude.flush().promise;
Tracking
track
Tracks an event. logEvent() is an alias.
track(eventInput: BaseEvent | string, eventProperties?: Record<string, any>, eventOptions?: EventOptions): AmplitudeReturn<Result>
| Parameter | Type | Description |
|---|---|---|
eventInput | string | BaseEvent | The event name, or an event object with event_type and any other event fields. |
eventProperties | Record<string, any> | Optional. Event properties. |
eventOptions | EventOptions | Optional. Event fields for this event only, such as user_id, device_id, time, or insert_id. |
amplitude.track("Song Played", { title: "Happy Birthday" });
identify
Sends user property operations as an $identify event. Go to Identify.
identify(identify: IIdentify, eventOptions?: EventOptions): AmplitudeReturn<Result>
If eventOptions sets user_id or device_id, the SDK also stores it as the current identity.
amplitude.identify(new amplitude.Identify().set("plan", "premium"));
setGroup
Assigns the current user to one or more groups.
setGroup(groupType: string, groupName: string | string[], eventOptions?: EventOptions): AmplitudeReturn<Result>
amplitude.setGroup("orgId", "15");
groupIdentify
Sets properties on a group.
groupIdentify(groupType: string, groupName: string | string[], identify: IIdentify, eventOptions?: EventOptions): AmplitudeReturn<Result>
amplitude.groupIdentify("orgId", "15", new amplitude.Identify().set("plan", "enterprise"));
revenue
Sends a revenue_amount event. Go to Revenue.
revenue(revenue: IRevenue, eventOptions?: EventOptions): AmplitudeReturn<Result>
amplitude.revenue(new amplitude.Revenue().setProductId("premium").setPrice(3.99));
trackScreenView
Sends [Amplitude] Screen Viewed with [Amplitude] Screen Name set to screenName, and remembers the screen name for element and frustration events. Does nothing when autocapture.screenViews is false. Requires 1.6.6 or later.
trackScreenView(screenName: string, eventProperties?: Record<string, any>, eventOptions?: EventOptions): AmplitudeReturn<Result | undefined>
amplitude.trackScreenView("Home", { tab: "feed" });
trackScreenViewOnNavigationStateChange
Finds the focused screen in a React Navigation state and calls trackScreenView() with its name. Skips the call when the focused screen hasn't changed since the last call. Requires 1.6.6 or later.
trackScreenViewOnNavigationStateChange(navigationState: NavigationState | undefined, eventProperties?: Record<string, any>, eventOptions?: EventOptions): AmplitudeReturn<Result | undefined>
<NavigationContainer onStateChange={amplitude.trackScreenViewOnNavigationStateChange} />
ampCapture
Wraps an event handler so each call sends [Amplitude] Element Interacted when autocapture.elementInteractions is on, and feeds frustration detection. Returns a function with the same signature as func. Nested ampCapture calls report once. Requires 1.6.8 or later.
ampCapture<Args extends unknown[], Return>(func: (...args: Args) => Return, properties: AmpCaptureProperties): (...args: Args) => Return
| Property | Event property |
|---|---|
action | [Amplitude] Action |
testID | [Amplitude] Target Test ID |
accessibilityLabel | [Amplitude] Target Accessibility Label |
element | [Amplitude] Target Element |
component | [Amplitude] Target Component |
All properties are optional strings. Rage clicks need action: "Press", and error clicks need "Press" or "LongPress".
<Pressable onPress={amplitude.ampCapture(onBuy, { action: "Press", testID: "buy" })} />
createNetworkRequestEvent
Builds a [Amplitude] Network Request event from request data you collected yourself, for example from a native networking library. Pass the result to track(). It doesn't apply network tracking rules or mask data, so remove sensitive values first. Requires 1.13.0 or later.
createNetworkRequestEvent(properties: NetworkRequestEventProperties): BaseEvent | undefined
| Property | Type | Description |
|---|---|---|
url | string | Required. The request URL. The SDK splits off the query and fragment. |
method | string | Required. The HTTP method. |
startTime | number | Required. Start time, in milliseconds since the Unix epoch. |
duration | number | Required. Milliseconds the request took. |
statusCode | number | Optional. Default 0. |
requestType | "xhr" | "fetch" | "custom" | Optional. Default "custom". |
error | { code?: number; message: string } | Optional. A local error, for requests without a status. |
requestBodySize, responseBodySize | number | Optional. Body sizes in bytes. |
requestHeaders, responseHeaders | Record<string, string> | Optional. Headers to record. |
requestBody, responseBody | string | Optional. Bodies to record. |
It returns undefined, and logs an error, when url or method is empty, or when a time is negative or not finite.
const event = amplitude.createNetworkRequestEvent({
url: "https://api.example.com/orders?id=1",
method: "POST",
startTime: Date.now() - 350,
duration: 350,
statusCode: 503,
});
if (event) amplitude.track(event);
Identity
getUserId and setUserId
Reads or sets the user ID that the SDK attaches to every event. Pass undefined to clear it.
getUserId(): string | undefined
setUserId(userId: string | undefined): void
amplitude.setUserId("user-12345");
getDeviceId and setDeviceId
Reads or sets the device ID.
getDeviceId(): string | undefined
setDeviceId(deviceId: string): void
amplitude.setDeviceId("8d8a2e3c-2b6f-4f7e-9c1e-3a5b0c6d7e8f");
reset
Clears the user ID and sets a new random device ID. The session continues.
reset(): void
amplitude.reset();
Sessions
getSessionId and setSessionId
Reads the session ID, or starts a new session with the ID you pass. After setSessionId(), the session doesn't time out until you call it again or the app restarts.
getSessionId(): number | undefined
setSessionId(sessionId: number): void
amplitude.setSessionId(Date.now());
extendSession
Records activity without sending an event, so the session's timeout starts over.
extendSession(): void
Privacy
setOptOut
Stops (true) or resumes (false) tracking. The SDK stores the setting with identity.
setOptOut(optOut: boolean): void
amplitude.setOptOut(true);
Identify
Identify collects user property operations for identify() and groupIdentify(). Each method returns the object, so you can chain calls. Use one operation per property per object: the SDK keeps the first operation for a property and ignores the rest.
| Method | Operation |
|---|---|
set(property, value) | Sets the value. |
setOnce(property, value) | Sets the value only if the property has no value yet. |
add(property, value) | Adds a number to the value. Treats a missing value as 0. |
append(property, value) | Adds values to the end of an array. Creates the array if needed. |
prepend(property, value) | Adds values to the start of an array. Creates the array if needed. |
postInsert(property, value) | Adds values to the end of an array, if they aren't in it already. |
preInsert(property, value) | Adds values to the start of an array, if they aren't in it already. |
remove(property, value) | Removes values from an array. |
unset(property) | Removes the property. |
clearAll() | Removes every user property. Discards every other operation on the object. |
getUserProperties() | Returns the operations as an object, for example { "$set": { "plan": "premium" } }. |
const identifyEvent = new amplitude.Identify()
.set("plan", "premium")
.add("login_count", 1);
Revenue
Revenue describes a purchase for revenue(). Each setter returns the object.
| Method | Event property | Description |
|---|---|---|
setProductId(productId) | $productId | Product identifier. Default "". |
setPrice(price) | $price | Unit price. Can be negative, for refunds. |
setQuantity(quantity) | $quantity | Units purchased. Default 1. |
setRevenue(revenue) | $revenue | Total revenue. Use it instead of price and quantity. |
setRevenueType(revenueType) | $revenueType | Type, such as purchase or refund. Required for revenue verification. |
setCurrency(currency) | $currency | Currency code, such as USD. |
setReceipt(receipt) | $receipt | Receipt identifier. Required for revenue verification. |
setReceiptSig(receiptSig) | $receiptSig | Receipt signature. Required for revenue verification. |
setEventProperties(properties) | Each key | Other event properties. |
getEventProperties() | — | Returns the event properties the SDK sends. |
const purchase = new amplitude.Revenue()
.setProductId("com.company.premium")
.setPrice(3.99)
.setQuantity(3);
Plugin
A plugin is an object the SDK runs for every event. Pass it to add().
| Member | Required | Description |
|---|---|---|
name | No | Unique name. remove() uses it to find the plugin. |
type | No | "before", "enrichment" (default), or "destination". |
setup(config, client) | No | Runs once when the plugin installs. Receives the resolved configuration and the instance. |
execute(event) | Destination: yes | Before and enrichment plugins return the event, possibly changed, or null to drop it. Destination plugins send the event and return a Result. |
teardown() | No | Runs on remove(). |
flush() | No | Destination plugins only. Runs on amplitude.flush(). |
onIdentityChanged(identity) | No | Runs after an identify() event, with the updated user properties. |
onOptOutChanged(optOut) | No | Runs when setOptOut() changes the value. |
The Plugin type also declares onSessionIdChanged() and onReset(), but the React Native SDK never calls them.
For each event, the SDK runs every before plugin, then every enrichment plugin, then every destination plugin. Plugins of the same type run in the order you added them. Use the string types; the SDK doesn't export a PluginType enum.
const lowercaseUserId: amplitude.Types.BeforePlugin = {
name: "lowercase-user-id",
type: "before",
execute: async (event) => {
if (event.user_id) event.user_id = event.user_id.toLowerCase();
return event;
},
};
amplitude.add(lowercaseUserId);
Storage
storageProvider and cookieStorage accept any object that implements Storage<T>. Every method is async.
| Method | Description |
|---|---|
isEnabled() | Resolves to true if the store is usable. The SDK skips it otherwise. |
get(key) | Resolves to the parsed value, or undefined. |
getRaw(key) | Resolves to the stored string, or undefined. |
set(key, value) | Stores the value. |
remove(key) | Removes the key. |
reset() | Removes every key the store owns. |
Types
amplitude.Types exports TypeScript types and constants, including:
| Export | Description |
|---|---|
ReactNativeOptions, ReactNativeConfig | The init() options object, and the resolved configuration. |
ReactNativeTrackingOptions, ReactNativeAttributionOptions | Option shapes for trackingOptions and attribution. |
BaseEvent, Event, EventOptions, IdentifyEvent, GroupIdentifyEvent | Event shapes. |
Result, AmplitudeReturn | Tracking results and the { promise } wrapper. |
Plugin, BeforePlugin, EnrichmentPlugin, DestinationPlugin | Plugin shapes. |
IIdentify, IRevenue, IdentifyOperation, RevenueProperty, SpecialEventType | Identify and revenue shapes. |
NavigationState | The React Navigation state that trackScreenViewOnNavigationStateChange() reads. |
ReactNativeClient | The instance type that createInstance() returns. |
LogLevel | Enum: None (0), Error (1), Warn (2), Verbose (3), Debug (4). |
ServerZone | Object with US and EU values. ServerZoneType is the string type. |
ILogger, Storage, IdentityStorageType, TransportType | Types for custom loggers, storage, and transports. |
ServerZone and LogLevel are the only runtime values. The rest are TypeScript types, so they're undefined at runtime. Types doesn't include OfflineDisabled. To turn off offline detection, pass offline: null.
Configuration options
Pass these in the options argument of init(). Many options exist for react-native-web and do nothing on iOS or Android. Web-only options lists those options.
General options
| Option | Type | Default | Description |
|---|---|---|---|
instanceName | string | $default_instance | Name that separates this instance's stored data from other instances. |
serverZone | "US" | "EU" | "US" | Data center to send events to. |
serverUrl | string | Set by serverZone and useBatch | URL to send events to. When set, the SDK ignores serverZone and useBatch. |
useBatch | boolean | false | Send to the Batch API instead of HTTP V2. |
flushIntervalMillis | number | 1000 | Milliseconds between the first queued event and the upload. |
flushQueueSize | number | 30 | Maximum events per upload request. Doesn't trigger an early upload. |
flushMaxRetries | number | 5 | Upload attempts before the SDK drops an event. Applies to retryable errors. |
offline | boolean | null | false | Whether the SDK holds uploads. The SDK sets it from the device's connectivity. null turns off connectivity detection. Requires 1.6.0 or later. |
optOut | boolean | false | Start with tracking turned off. A stored opt-out from setOptOut() applies when you don't pass this option. |
logLevel | Types.LogLevel | LogLevel.Warn | Lowest level of log message to write. |
loggerProvider | ILogger | Logger that writes to console | Custom logger. |
minIdLength | number | Unset (Amplitude applies 5) | Minimum length for user_id and device_id. The SDK sends it to Amplitude with each request. |
transportProvider | Transport | fetch-based transport | Custom object with a send(serverUrl, payload) method that uploads events. |
enableRequestBodyCompression | boolean | false | Try gzip compression for a custom serverUrl. Amplitude's own endpoints always try. Needs CompressionStream, which Hermes doesn't provide. |
storageProvider | Storage<Event[]> | AsyncStorage | Where the SDK keeps unsent events. Falls back to memory when AsyncStorage isn't available. |
cookieStorage | Storage<UserSession> | AsyncStorage on iOS and Android; a cookie, then localStorage, on web | Where the SDK keeps identity and session state. Falls back to memory. |
migrateLegacyData | boolean | true | Import device ID, user ID, session, and unsent events from the maintenance SDK. Requires 1.3.4 or later. |
plan | Plan | Unset | Tracking plan details (branch, source, version, versionId) to attach to events. |
ingestionMetadata | IngestionMetadata | Unset | Source name and version to attach to events. For partners that build integrations. |
The options type also accepts identify, but the React Native SDK doesn't apply it. Call identify() after init() instead.
Identity and session options
| Option | Type | Default | Description |
|---|---|---|---|
userId | string | Stored value | User ID. Same as the userId argument of init(). |
deviceId | string | Stored value, or a new UUID | Device ID. |
sessionId | number | Stored session, or a new one | Session ID to start with. Like setSessionId(), it stops automatic session timeouts. |
sessionTimeout | number | 300000 (5 minutes) | Milliseconds of inactivity after which the next foreground or background event starts a new session. |
partnerId | string | Unset | Partner ID to send as partner_id. For partners that build integrations. |
appVersion | string | The native app version | App version to send as app_version. |
Data collection options
| Option | Type | Default | Description |
|---|---|---|---|
trackingOptions | ReactNativeTrackingOptions | Go to trackingOptions | Which device properties to collect. |
autocapture | boolean | ReactNativeAutocaptureOptions | Unset (off) | Autocapture features. Go to Autocapture options. Requires 1.6.6 or later. |
trackingSessionEvents | boolean | false | Deprecated. Use autocapture.sessions. |
remoteConfig | { fetchRemoteConfig?: boolean; serverUrl?: string } | { fetchRemoteConfig: false } | Fetch Autocapture settings from Amplitude during init(). serverUrl sends the request through your own proxy. Requires 1.10.0 or later. |
trackingOptions
Each option controls one event field. Set an option to false to omit the field.
| Option | Default | Event field | Platforms |
|---|---|---|---|
platform | true | platform | All |
osName | true | os_name | All |
osVersion | true | os_version | All |
deviceManufacturer | true | device_manufacturer | All |
deviceModel | true | device_model | All |
language | true | language | All |
ipAddress | true | ip ($remote) | All |
carrier | true | carrier | Android, and iOS 15 and earlier |
adid | true | adid | Android, with Google Play services |
appSetId | true | android_app_set_id | Android, with Google Play services |
idfv | true | idfv | iOS |
country | false | country | iOS and Android |
If you turn on country, the SDK sends the device's country, which stops Amplitude from filling region, city, and DMA from the IP address.
Autocapture options
Pass autocapture: true to turn on every option in this table, or an object to choose. Options you leave out of an object are off.
| Option | Type | Description |
|---|---|---|
sessions | boolean | session_start and session_end events. Requires 1.6.6 or later. |
appLifecycles | boolean | Application Opened and Backgrounded events. Requires 1.6.6 or later. Installed and Updated events require 1.6.8 or later. |
screenViews | boolean | Set to false to turn off trackScreenView() and trackScreenViewOnNavigationStateChange(). The helpers work when you omit it. Requires 1.6.6 or later. |
elementInteractions | boolean | [Amplitude] Element Interacted for handlers wrapped with ampCapture(). Requires 1.6.8 or later. |
frustrationInteractions | boolean | { rageClick?: boolean; errorClick?: boolean } | Rage and error clicks for handlers wrapped with ampCapture(). In an object, each type is on unless you set it to false. Requires 1.11.0 or later. Error clicks are experimental and require 1.12.0 or later. |
networkTracking | boolean | NetworkTrackingOptions | [Amplitude] Network Request for JavaScript fetch and XMLHttpRequest calls. Requires 1.6.7 or later. |
NetworkTrackingOptions
| Option | Type | Default | Description |
|---|---|---|---|
captureRules | NetworkCaptureRule[] | One rule: status codes 500-599 | Which requests to capture, and what to record. The SDK evaluates rules from last to first, so put specific rules last. |
ignoreHosts | string[] | [] | Hosts to skip. Supports *, for example ["*.example.com", "example.com"]. |
ignoreAmplitudeRequests | boolean | true | Skip requests to Amplitude. |
NetworkCaptureRule
| Option | Type | Default | Description |
|---|---|---|---|
urls | (string | RegExp)[] | All URLs | URLs to match. Strings support *. Takes precedence over hosts. |
hosts | string[] | All hosts | Hosts to match. Supports *. Use urls for new rules. |
methods | string[] | ["*"] | HTTP methods to match, such as ["POST", "PUT"]. |
statusCodeRange | string | "500-599" | Status codes to match. Comma-separated codes and ranges, such as "0,400-499,503". |
requestHeaders | boolean | string[] | false | Request headers to record. true records safe headers. An array records the headers you name. |
responseHeaders | boolean | string[] | false | Response headers to record, with the same values as requestHeaders. |
requestBody | BodyCaptureRule | Unset | Fields to record from a JSON request body. |
responseBody | BodyCaptureRule | Unset | Fields to record from a JSON response body. |
BodyCaptureRule
| Option | Type | Default | Description |
|---|---|---|---|
allowlist | string[] | [] | JSON pointer paths to record. The leading / is optional. * matches one key, and ** matches any number of keys. |
excludelist | string[] | [] | Paths to remove from what allowlist records. |
blocklist | string[] | [] | Deprecated. Use excludelist. |
Safe headers
With requestHeaders: true or responseHeaders: true, the SDK records only these headers, so it doesn't capture credentials:
access-control-allow-origin, access-control-allow-credentials, access-control-expose-headers, access-control-max-age, access-control-allow-methods, access-control-allow-headers, accept-patch, accept-ranges, age, allow, alt-svc, cache-control, connection, content-disposition, content-encoding, content-language, content-length, content-location, content-md5, content-range, content-type, date, delta-base, etag, expires, im, last-modified, link, location, permanent, p3p, pragma, proxy-authenticate, public-key-pins, retry-after, server, status, strict-transport-security, trailer, transfer-encoding, tk, upgrade, vary, via, warning, www-authenticate, x-b3-traceid, x-frame-options.
Web-only options
These options apply only on react-native-web, where the SDK stores identity in a cookie.
| Option | Type | Default | Description |
|---|---|---|---|
disableCookies | boolean | false | Store identity in localStorage instead of a cookie. |
domain | string | The top-level domain | Cookie domain. |
cookieExpiration | number | 365 | Cookie lifetime in days. |
cookieSameSite | string | "Lax" | Cookie SameSite attribute. |
cookieSecure | boolean | false | Cookie Secure attribute. |
cookieUpgrade | boolean | true | Read and delete cookies from the maintenance Browser SDK. |
attribution | ReactNativeAttributionOptions | Unset | Marketing attribution from UTM parameters and referrers. Options: disabled, excludeReferrers, initialEmptyValue, trackNewCampaigns, trackPageViews, resetSessionOnNewCampaign. |
Autocaptured event properties
Application events
| Event | Properties |
|---|---|
[Amplitude] Application Installed | [Amplitude] Version, [Amplitude] Build |
[Amplitude] Application Updated | [Amplitude] Version, [Amplitude] Build, [Amplitude] Previous Version, [Amplitude] Previous Build |
[Amplitude] Application Opened | None |
[Amplitude] Application Backgrounded | None |
[Amplitude] Screen Viewed | [Amplitude] Screen Name, plus any properties you pass |
Element interaction properties
[Amplitude] Element Interacted, [Amplitude] Rage Click, and [Amplitude] Error Click include these properties when the values exist:
| Property | Description |
|---|---|
[Amplitude] Action | The action passed to ampCapture(), such as Press. |
[Amplitude] Target Test ID | The element's testID. |
[Amplitude] Target Accessibility Label | The element's accessibilityLabel. |
[Amplitude] Target Element | The JSX tag name, such as Button. |
[Amplitude] Target Component | The enclosing React component name. |
[Amplitude] Screen Name | The last screen name from trackScreenView(). |
Rage click properties
| Property | Description |
|---|---|
[Amplitude] Begin Time | Time of the first press, in milliseconds since the Unix epoch. Also the event's time. |
[Amplitude] End Time | Time of the last press. |
[Amplitude] Duration | Milliseconds from the first press to the last. |
[Amplitude] Click Count | Number of presses. |
[Amplitude] Clicks | Array of presses, each with x, y, and time. |
Error click properties
| Property | Description |
|---|---|
[Amplitude] Kind | The error kind. Unhandled errors use error. |
[Amplitude] Message | The error message. |
[Amplitude] Stack | The stack trace. |
[Amplitude] Filename | The source file, when the error includes it. |
[Amplitude] Line Number | The line number, when the error includes it. |
[Amplitude] Column Number | The column number, when the error includes it. |
Network request properties
| Property | Description |
|---|---|
[Amplitude] URL | The request URL, with sensitive parts masked. |
[Amplitude] URL Query | The query string. |
[Amplitude] URL Fragment | The fragment. |
[Amplitude] Request Method | The HTTP method. |
[Amplitude] Request Type | fetch or xhr. custom for events from createNetworkRequestEvent(). |
[Amplitude] Status Code | The response status code. |
[Amplitude] Error Code | The local error code, when the request failed without a status. |
[Amplitude] Error Message | The local error message, when the request failed without a status. |
[Amplitude] Start Time | Request start, in milliseconds since the Unix epoch. |
[Amplitude] Completion Time | Request completion, in milliseconds since the Unix epoch. |
[Amplitude] Duration | Milliseconds from start to completion. |
[Amplitude] Request Body Size | Request body size in bytes. |
[Amplitude] Response Body Size | Response body size in bytes. |
[Amplitude] Request Headers | Recorded request headers, when a rule sets requestHeaders. |
[Amplitude] Response Headers | Recorded response headers, when a rule sets responseHeaders. |
[Amplitude] Request Body | Recorded request body fields, as a JSON string. |
[Amplitude] Response Body | Recorded response body fields, as a JSON string. |
Platform support
@amplitude/analytics-react-native | React Native | Gradle | Android Gradle Plugin |
|---|---|---|---|
| 1.4.0 and later | 0.68 and later | 7.5.1+ | 7.2.1+ |
| 1.0.0 to 1.3.6 | 0.61 to 0.70 | 3.5.3+ | 3.5.3+ |
The SDK supports iOS, Android, and react-native-web. It doesn't run in Expo Go. Its native modules declare iOS 12.0 and Android API level 21 as minimums.
These releases changed the SDK's iOS or Android code or build files: 1.3.0, 1.3.4, 1.3.6, 1.4.0, 1.4.1, 1.4.2, 1.4.11, 1.4.14, 1.5.52, 1.6.0, 1.6.5, 1.6.8, and 1.9.0. If you deliver updates over the air, ship a new native build when you upgrade across one of them. For each release, go to the SDK releases on GitHub.
이 내용이 도움이 되었나요?
For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.