On this page

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.

Install an Amplitude server SDK

For backend engineers5 minBeginner

This quickstart installs an Amplitude SDK on a server so your backend can send events. Pick your language: Node.js or Python. Each language takes three steps: install, initialize, and track your first event.

To send events without an SDK, use the HTTP API Quickstart.

Prerequisites

  • An Amplitude project and its API key. Create a free Amplitude account if you need one.
  • Access to your server codebase.

Install the SDK

  1. Install

    Install the package

    bash
    npm install @amplitude/analytics-node
    
  2. Initialize

    Initialize Amplitude at startup

    javascript
    import { init, track } from "@amplitude/analytics-node";
    
    init("AMPLITUDE_API_KEY");
    
  3. Track

    Track your first event

    javascript
    track("Button Clicked", undefined, { user_id: "user@example.com" });
    

For full configuration options, refer to Node.js SDK.

Confirm that events arrive

After you track your first event, open the Amplitude Debugger to confirm that it reaches your project.

Was this helpful?