Quick Start

Let's Get Started with LogSnag!

Create a project.

LogSnag lets you make a project for each app you have. You can make as many as you like!

Click the "+" button on the side and give your project a name, like "my-saas."

Create a channel.

Channels are like boxes for your events. You could have one for payments, another for logins, and so on.

Click the "+" button on the side and name your channel "payments."

Keep your project and channel names simple! Use lowercase for project and channel names, with letters, numbers, and dashes.

Create an API token.

API tokens let LogSnag know it's really you. You can make as many as you like, each with different access levels.

To make an API token, go to the API page in Settings and create and copy a new token.

If you're using LogSnag on a website or app that others can see, make sure to set your Token's access to "Public." Also, keep its roles limited to a certain project and channel.

Track your first event.

Now that you have your project, channel, and API token, you're ready to track an event! You can do this by making a POST request to the LogSnag API.

curl --location --request POST 'https://api.logsnag.com/v1/log' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "project": "my-saas",
    "channel": "payments",
    "event": "New Subscription",
    "user_id": "user-123",
    "icon": "💰",
    "notify": true,
    "tags": {
        "plan": "premium",
        "cycle": "monthly",
        "trial": false
    }
}'

After making the request, you'll get a notification on your device. You'll also see the event pop up in real time on the LogSnag dashboard! It'll be under the "payments" channel in the "my-saas" project.

Want to learn more about logs? Have a look at the /log endpoint section. You can also check out other endpoints on the API references page.

LogIdentifyInsight

Last updated