이 페이지에서

Autocapture Plugin

이 페이지는 아직 사용하시는 언어로 번역되지 않았습니다. 현재 작업 중이니 잠시 후 다시 확인해 주세요.

Autocapture plugin is deprecated

Starting with Browser SDK version 2.10.0, Amplitude includes Autocapture functionality with the SDK.

For best results, upgrade to Browser SDK 2.10.0 or higher using the following instructions.

Update to the built-in Autocapture

If you use the Autocapture plugin and update the Browser SDK to version 2.10.0 or newer, complete the following steps to remove the plugin and use the Autocapture that ships with Browser SDK.

Script loader

Replace your referenced script with the following snippet:

html
<script src="https://cdn.amplitude.com/libs/analytics-browser-2.45.4-min.js.gz"></script>
<script>
  window.amplitude.init("AMPLITUDE_API_KEY", {
    autocapture: { elementInteractions: true },
  });
</script>

Npm or yarn

If you use npm or yarn to add the Browser SDK, update the Browser SDK package and remove the Autocapture plugin.

js
// package.json
{
  "dependencies": {
    "@amplitude/analytics-browser": "^2.10.0", // make sure the minimum version is 2.10.0
    "@amplitude/plugin-autocapture-browser": "0.9.0",
  }
}

In your script, remove references to the Autocapture plugin.

js
import * as amplitude from "@amplitude/analytics-browser";
import { autocapturePlugin } from "@amplitude/plugin-autocapture-browser";

amplitude.init(AMPLITUDE_API_KEY);
amplitude.init(AMPLITUDE_API_KEY, {
  autocapture: {
    elementInteractions: true,
  },
});
amplitude.add(autocapturePlugin());

Was this helpful?