Skip to content

Quick Start

Publish Your First Event

Begin your journey with Palzin Track by publishing your very first event. This guide will walk you through the initial steps to set up your project, create channels, and publish events for effective event tracking.

Setup Your Project

Palzin Track utilizes the concept of projects to provide dedicated workspaces for each of your applications. Within these projects, you have the flexibility to create multiple channels, organizing your events in a way that suits your preferences.

To embark on this journey, follow these steps:

  1. Create a New Project and Channel: As a starting point, establish your first project and define a channel within it. For instance, let's assume you name your project "my-website" and your inaugural channel "user-register". Remember, the project and channel names should be in lowercase letters. You can employ alphabet characters, digits, and dashes "-" for naming. The following validation regex should guide your naming: ^[a-z0-9]+(?:-[a-z0-9]+)*$

Copy Your API Token

To ensure secure and authenticated API requests, Palzin Track relies on API keys. Any request without an accompanying API key will result in an error. Here's how to obtain and utilize your API token:

  1. Navigate to API Settings: Head over to the API page within the Settings section of your Palzin Track account.
  2. Generate and Copy API Token: Create a new API token from the API settings. It's crucial to note that if you plan to use Palzin Track within a publicly accessible website or a client application, you must configure your Token's access level as "Public". Furthermore, you can limit its roles to a specific project and channel for enhanced security.

Remember, the API token is your key to seamless communication with Palzin Track's services, ensuring your events are tracked accurately and securely.

Should you require further guidance or have inquiries about utilizing Palzin Track to its fullest potential, don't hesitate to reach out to our support team. For comprehensive insights into Palzin Track's capabilities, refer to our detailed documentation.

Public your first Event

Congratulations on taking the first step to leverage the capabilities of Palzin Track! By publishing your initial event, you unlock the potential to gain valuable insights into your application's performance. This guide will walk you through the process of publishing your event using Palzin Track.

Making a POST Request

To publish your event to Palzin Track, you'll be utilizing HTTP POST requests to the designated log endpoint. Here's how to get started:

POST https://api.palzin.live/v1/log

Publish Event

To publish an event on Palzin Track, make use of the designated API route. Craft your request following the guidelines below:

Parameters:

Header
Content-TypeHeaderapplication/json
AuthorizationHeaderYour Authorization Token
Body
project*StringProject name
channel*StringChannel name
event*StringEvent name
descriptionStringEvent description
iconEmojiSingle emoji as the event icon
notifyBooleanSend push notification
tagskey/valueEvent tags
parserString"markdown" or "text"
Responses (200: OK)
js
{
   // Response   
}
{
   // Response   
}

Take a look at the code snippet.

shell
curl --location --request POST 'https://api.palzin.live/v1/log' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "project": "my-website",
    "channel": "user-register",
    "event": "User Registered",
    "description": "email: [email protected]",
    "icon": "🔥",
    "notify": true,
    "tags": {
        "email": "[email protected]",
        "uid": "uid1234"
    }
}'
curl --location --request POST 'https://api.palzin.live/v1/log' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "project": "my-website",
    "channel": "user-register",
    "event": "User Registered",
    "description": "email: [email protected]",
    "icon": "🔥",
    "notify": true,
    "tags": {
        "email": "[email protected]",
        "uid": "uid1234"
    }
}'
python
import http.client
import json

conn = http.client.HTTPSConnection("palzin.live")
payload = json.dumps({
  "project": "my-product",
  "channel": "waitlist",
  "event": "Waitlist Member",
  "description": "email: [email protected]",
  "icon": "🔥",
  "tags": {
        "email": "[email protected]",
        "uid": "uid1234"
  },
  "notify": True
})
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json'
}
conn.request("POST", "/v1/log", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import http.client
import json

conn = http.client.HTTPSConnection("palzin.live")
payload = json.dumps({
  "project": "my-product",
  "channel": "waitlist",
  "event": "Waitlist Member",
  "description": "email: [email protected]",
  "icon": "🔥",
  "tags": {
        "email": "[email protected]",
        "uid": "uid1234"
  },
  "notify": True
})
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json'
}
conn.request("POST", "/v1/log", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
javascript
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer YOUR_API_TOKEN");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
   "project": "my-product",
   "channel": "waitlist",
   "event": "Waitlist Member",
   "description": "email: [email protected]",
   "icon": "🔥",
   "notify": true
});

var requestOptions = {
   method: 'POST',
   headers: myHeaders,
   body: raw,
   redirect: 'follow'
};

fetch("https://api.palzin.live/v1/log", requestOptions)
        .then(response => response.text())
        .then(result => console.log(result))
        .catch(error => console.log('error', error));
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer YOUR_API_TOKEN");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
   "project": "my-product",
   "channel": "waitlist",
   "event": "Waitlist Member",
   "description": "email: [email protected]",
   "icon": "🔥",
   "notify": true
});

var requestOptions = {
   method: 'POST',
   headers: myHeaders,
   body: raw,
   redirect: 'follow'
};

fetch("https://api.palzin.live/v1/log", requestOptions)
        .then(response => response.text())
        .then(result => console.log(result))
        .catch(error => console.log('error', error));
javascript
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
   'method': 'POST',
   'hostname': 'palzin.live',
   'path': '/v1/log',
   'headers': {
      'Authorization': 'Bearer YOUR_API_TOKEN',
      'Content-Type': 'application/json'
   },
   'maxRedirects': 20
};

var req = https.request(options, function (res) {
   var chunks = [];

   res.on("data", function (chunk) {
      chunks.push(chunk);
   });

   res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
   });

   res.on("error", function (error) {
      console.error(error);
   });
});

var postData = JSON.stringify({
   "project": "my-product",
   "channel": "waitlist",
   "event": "Waitlist Member",
   "description": "email: [email protected]",
   "icon": "🔥",
   "notify": true
});

req.write(postData);

req.end();
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
   'method': 'POST',
   'hostname': 'palzin.live',
   'path': '/v1/log',
   'headers': {
      'Authorization': 'Bearer YOUR_API_TOKEN',
      'Content-Type': 'application/json'
   },
   'maxRedirects': 20
};

var req = https.request(options, function (res) {
   var chunks = [];

   res.on("data", function (chunk) {
      chunks.push(chunk);
   });

   res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
   });

   res.on("error", function (error) {
      console.error(error);
   });
});

var postData = JSON.stringify({
   "project": "my-product",
   "channel": "waitlist",
   "event": "Waitlist Member",
   "description": "email: [email protected]",
   "icon": "🔥",
   "notify": true
});

req.write(postData);

req.end();
php
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.palzin.live/v1/log',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS =>'{
    "project": "my-product",
    "channel": "waitlist",
    "event": "Waitlist Member",
    "description": "email: [email protected]",
    "icon": "🔥",
    "notify": true
}',
    CURLOPT_HTTPHEADER => array(
        'Authorization: Bearer YOUR_API_TOKEN',
        'Content-Type: application/json'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.palzin.live/v1/log',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS =>'{
    "project": "my-product",
    "channel": "waitlist",
    "event": "Waitlist Member",
    "description": "email: [email protected]",
    "icon": "🔥",
    "notify": true
}',
    CURLOPT_HTTPHEADER => array(
        'Authorization: Bearer YOUR_API_TOKEN',
        'Content-Type: application/json'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;