On this page

Amplitude Quickstart

Amplitude is quick to set up. Most implementations take under 10 minutes from install to seeing your first events. Pick your platform below and follow a few steps.

Not finding your platform? Browse all Amplitude SDKs.

Pick your platform

Amplitude offers several ways to instrument a JavaScript web app. Choose the method that fits your workflow.

Install the Browser SDK with a snippet

Paste-and-go install for websites. Add this script to the <head> of your site when you want the fastest possible browser install with no build step or npm package.

Set up with a browser snippet

Use this option for static sites, CMS-driven sites, or any project where a script tag is easier than an SDK install.

What you get

  1. Paste

    Paste the snippet into your site's `<head>`

    Add it to every page you want to track.

    html
    <script src="https://cdn.amplitude.com/script/AMPLITUDE_API_KEY.js"></script>
    <script>
      window.amplitude.add(window.sessionReplay.plugin({ sampleRate: 1 }));
      window.amplitude.init("AMPLITUDE_API_KEY", {
        fetchRemoteConfig: true,
        autocapture: {
          attribution: true,
          fileDownloads: true,
          formInteractions: true,
          pageViews: true,
          sessions: true,
          elementInteractions: true,
          networkTracking: true,
          webVitals: true,
          frustrationInteractions: true,
        },
      });
    </script>
    
  2. Set

    Set your API key and load the page

    Replace the placeholder with your project's API key, then load a tracked page in your browser.

  3. Confirm

    Confirm data in Amplitude

    Open the Amplitude Debugger and check for page view, session, and interaction events.

Tips

  • Click the API key button in the code block to insert your key before you copy the snippet.
  • Use the EU CDN host if your project uses EU data residency.
  • Create a free Amplitude account if you need a project and API key.

Take the next step

After data starts flowing, use these guides to expand your implementation.

Was this helpful?