Getting Started

Introduction

Get started with CapHog´s NodeJs SDK. In just a few lines of code, you can start tracking events in your application.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Create a CapHog account. If you don't have one, you can sign up here.
  • Create a project in the CapHog Dashboard.
  • Create at least one event in your project.

Installation

To install the CapHog NodeJs SDK, run the following command:

npm install @caphog/sdk

Usage

If the installation was successful, and you have checked the prerequisites, you can set up the SDK in your project.

import { CapHog } from '@caphog/sdk'

CapHog.initialize({projectId: 'your-project-id'})
CapHog.logEvent({eventName: 'your-event-name'})

Replace 'your-project-id' with the actual project ID from your CapHog dashboard and 'your-event-name' with the name of the event you want to log.

You can find your project ID in the CapHog dashboard under the project settings.

Copyright © 2025