이 페이지에서

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.

이 내용이 도움이 되었나요?