
{% quickstart-meta audience="For engineers implementing Amplitude" time="15 min" level="intermediate" /%}

This quickstart is for engineers implementing Amplitude for the first time. Follow these steps to install the Browser SDK, verify that events flow into your project, and ship your first feature flag.

{% callout type="tip" %}
Want automated setup? Run `npx @amplitude/wizard` in your project directory. The [Amplitude Wizard CLI](/docs/get-started/setup-wizard-cli) detects your framework, proposes custom events, and instruments the SDK automatically.
{% /callout %}

{% outcomes %}
{% outcome icon="Code" title="Browser SDK 2" href="/docs/sdks/analytics/browser/browser-unified-sdk" %}
Installed and sending events to your Amplitude project.
{% /outcome %}
{% outcome icon="Zap" title="Autocapture enabled" href="/docs/data/autocapture" %}
Clicks, page views, and sessions tracked without manual event calls.
{% /outcome %}
{% outcome icon="FlaskConical" title="A feature flag" href="/docs/feature-experiment/workflow/feature-flag-rollouts" %}
A live flag you can roll out to a subset of users.
{% /outcome %}
{% /outcomes %}

{% prerequisites %}
{% prerequisite %}
An Amplitude account and a project API key — go to [Create a project](/docs/get-started/create-project) if you don't have one.
{% /prerequisite %}
{% prerequisite %}
Access to your product's codebase (front-end or back-end, depending on your stack).
{% /prerequisite %}
{% prerequisite %}
A Member, Developer, or Admin role in your Amplitude organization.
{% /prerequisite %}
{% /prerequisites %}

{% callout type="note" %}
If your team is still deciding what to track, go to [Instrumentation prework](/docs/get-started/instrumentation-prework) first to align on a tracking plan before you write any code.
{% /callout %}

{% steps %}

{% step eyebrow="Install" title="Add the Browser SDK" %}
The [Browser SDK](/docs/sdks/analytics/browser/browser-unified-sdk) is the fastest path to getting data into Amplitude. Add it to your site with a script tag or an npm package, then initialize it with your project API key.

```html
<script type="text/javascript">
  !function(){"use strict";...}();
  amplitude.init('YOUR_API_KEY');
</script>
```

Amplitude provides a pre-configured snippet and an AI prompt in your project settings when you first create an account. Go to your project settings to copy the snippet for your region.

After initialization, call `amplitude.track('Event Name', { property: 'value' })` to send your first custom event.
{% /step %}

{% step eyebrow="Capture" title="Enable Autocapture" %}
[Autocapture](/docs/data/autocapture) tracks clicks, page views, sessions, form interactions, file downloads, and marketing attribution without any manual event calls. Enable Autocapture by passing `autocapture: true` during initialization:

```js
amplitude.init("YOUR_API_KEY", { autocapture: true });
```

Check your Amplitude project's _Live Events_ view to confirm that events are arriving. You don't need to add additional tracking code for the behaviors Autocapture handles.

{% callout type="note" %}
Autocapture is best for capturing broad behavioral data. For business-critical actions, such as purchases, upgrades, and key feature usage, add explicit `amplitude.track()` calls so those events carry the right properties.
{% /callout %}
{% /step %}

{% step eyebrow="Experiment" title="Launch a feature flag" %}
[Feature Experiment](/docs/feature-experiment/experiment-quick-start) lets you roll out changes to a subset of users without a code deployment. Create a flag in the Amplitude UI, add the SDK to your codebase, and check the flag value at runtime.

```js
const variant = experiment.variant("my-flag");
if (variant.value === "treatment") {
  // show new feature
}
```

Go to [Feature flag rollouts](/docs/feature-experiment/workflow/feature-flag-rollouts) for a full walkthrough of targeting rules, gradual rollouts, and flag cleanup.
{% /step %}

{% /steps %}

## Next steps

{% card-grid %}
{% card title="Get answers about your implementation" description="Common questions about identity, event batching, and data validation." href="/docs/get-started/engineer-questions" icon="❓" /%}
{% card title="Run an A/B test" description="Extend your feature flag into a full experiment with statistical analysis." href="/docs/feature-experiment/experiment-quick-start" icon="🧪" /%}
{% /card-grid %}
