# Track your first product event

Send one event and verify it before instrumenting your application.

## 1. Enable Product Analytics

In **Catalogs**, choose **New Catalog** and enable **Product Analytics** in your environment. Create or copy a [Product Analytics API key](/docs/product-analytics/authentication.md).

Product Analytics uses its own API key. MCP authorization and lakehouse credentials do not replace it.

## 2. Send an event

Set the API key for the target environment. The key selects the environment:

```bash
ALTERTABLE_API_KEY='YOUR_PRODUCT_ANALYTICS_API_KEY'
curl https://api.altertable.ai/track \
  -H "X-API-Key: $ALTERTABLE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"event":"Onboarding Test","properties":{},"distinct_id":"onboarding_test_user"}'
```

## 3. Find the event

Run this in [SQL Explorer](/docs/lakehouse/query/sql-explorer.md):

```sql
SELECT event, distinct_id, timestamp
FROM product_analytics.main.events
WHERE event = 'Onboarding Test'
ORDER BY timestamp DESC
LIMIT 10;
```

Confirm that the event belongs to `onboarding_test_user` and has a recent timestamp.

## Do this with your agent

```text
Read https://altertable.ai/docs/product-analytics/setup.md. Set up Product Analytics for this application. Inspect the framework, existing analytics, authentication, and consent handling. Ask which completed action I want to measure and confirm the target environment. Reuse a supported SDK and propose one event with a stable test identity. Keep the environment's Product Analytics key outside source control. Verify the event with a bounded query by its name and test identity, including its properties and timestamp.
```

Next, [install an SDK in your application](/docs/product-analytics/setup.md) to send real events.