> ## Documentation Index
> Fetch the complete documentation index at: https://help.getvero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> Set up Vero tracking in your application. Install the SDK, identify users, and start tracking events in minutes.

## Prerequisites

Before you begin, you'll need:

* A Vero account ([sign up here](https://getvero.com/get-started) if you don't have one)
* Your **Tracking API key**, found on the [Settings page](https://connect.getvero.com/settings/project/tracking-api-keys) of your Vero account

## Choose your integration method

<CardGroup>
  <Card title="JavaScript/TypeScript SDK" icon="js" href="#install-the-javascript-sdk">
    Recommended for websites and front-end applications.
  </Card>

  <Card title="NPM Package" icon="npm" href="https://www.npmjs.com/package/@getvero/tracking">
    For React, Node.js, and other JavaScript build environments.
  </Card>

  <Card title="REST API" icon="code" href="/api-reference/track/overview">
    For server-side integrations in any language.
  </Card>

  <Card title="Community SDKs" icon="users" href="/developer-docs/community-sdks">
    Ruby, PHP, and other community-maintained libraries.
  </Card>
</CardGroup>

## Install the JavaScript SDK

Add the following to the `<head>` section of every page you want to track, replacing `<YOUR_TRACKING_API_KEY_HERE>` with your API key. You can find your Tracking API key on the [Settings page](https://connect.getvero.com/settings/project/tracking-api-keys) of your Vero account.

```html theme={null}
<script src="https://cdn.jsdelivr.net/npm/@getvero/tracking@latest/dist/index.window.js"></script>
<script>
    vero.tracker.init({
        trackingApiKey: "<YOUR_TRACKING_API_KEY_HERE>"
    })
</script>
```

<Info>
  This SDK is also available as [an NPM package](https://www.npmjs.com/package/@getvero/tracking) for advanced use cases (e.g., integrating in React or Node.js applications). Refer to the package's README for more information.
</Info>

## Identify a user

When a user logs in, call `user.identify` with their `id` and `email` (both required). This adds or updates the user in your Vero data store.

```javascript theme={null}
vero.tracker.user.identify({
    id: "<USER_ID_HERE>",
    email: "<USER_EMAIL_HERE>"
})
```

You can also attach additional channels and custom data to the user profile:

```javascript theme={null}
vero.tracker.user.identify({
    id: "<USER_ID_HERE>",
    email: "<USER_EMAIL_HERE>",
    phone_number: "<PHONE_NUMBER_HERE>",
    channels: [
        {
            type: "push",
            address: "<PUSH_TOKEN_HERE>",
            platform: "android"
        }
    ],
    data: {
        first_name: "<FIRST_NAME_HERE>",
        last_name: "<LAST_NAME_HERE>"
    }
})
```

The `phone_number` property stores a phone number against the user's profile and is used as the delivery address for SMS messages sent via Journeys. Similarly, the `channels` array is used to register push tokens so Vero can deliver push notifications to the user's device.

Once identified, users will appear in the **Profiles** section of your Vero account where you can view their properties, channel addresses, and activity history. Learn more about [user profiles](/vero-2/user-profiles/understanding-user-profiles).

## Track an event

An event represents a user action in your application, such as viewing a product or completing a purchase.

```javascript theme={null}
vero.tracker.event.track({
    eventName: "viewed product",
    data: {
        product_name: "Red T-shirt",
        product_url: "https://www.example.com/products/red-t-shirt",
    }
})
```

You must call `user.identify` before calling `event.track`, unless you supply an `identity` object to the method. Once you call `user.identify`, the SDK stores the `id` and `email` in local storage for future requests.

Tracked events will appear on the **Events** page in your Vero account, where you can view recent occurrences, event properties, and which campaigns use each event as a trigger. Learn more about [events in Vero](/vero-2/events/events-overview).

## Unidentify a user

When a user logs out, call `user.unidentify` so future events are not associated with them.

```javascript theme={null}
vero.tracker.user.unidentify()
```
