Getting started
The UserLog API can be used in different ways: from simple Javascript snippets to SDKs for Node, NextJS, React, PHP and more. You can implement it by sendng a POST
request to the /api/v1/log
endpoint, via Javasript (from CDN) or SDKs (Node, NextJS, React, PHP).
API Reference
Our API Endpoints are the core of UserLog. They are used to track events in your application, send pageviews or log user related information. These events could be interactive user actions, or server events.
Endpoints
- /api/v1/log: Track user events such as clicks, feature usage or server-side actions.
- /api/v1/page: Pageviews (only for web) - coming soon.
- /api/v1/profile: User related information like user ID, email address, name and more. - coming soon.
To publish an event to UserLog, use the following POST
request:
POST https://api.getuserlog.com/api/v1/log
Required Request Headers
Name | Type | Description |
---|---|---|
Content-Type | String | application/json |
Authorization | String | Bearer <API_KEY> |
Request Body
Name | Type | Required | Description |
---|---|---|---|
project | String | yes | Project name |
channel | String | yes | Channel name |
event | String | yes | Event name |
user_id | String | yes | User ID, e.g. abc@example.com |
description | String | optional | Event description |
tags | key/value pairs as String | optional | Event tags |
icon | Emoji | optional | Single Emoji, e.g. 💰 |
notify | Boolean | yes | Send push notification |
Example Response
{
"status": "ok",
}