---
title: "LitLyx: A Fresh Take on Event Tracking"
description: Explore how LitLyx and its litlyx-sender Python module streamline event tracking, offering an efficient solution for analytics and insights in projects.
image: https://codenotary.com/hubfs/CN-Assets%20(7)-1.png
---

**$ protect --distro linux --machines 25 --free**

[Start now](https://apps.codenotary.com/linux)

[![cn-logo-black-nobg](https://codenotary.com/hubfs/cn-logo-black-nobg.svg)](https://codenotary.com/)

- Product
  
  #### [![AgentMon Start](https://codenotary.com/hubfs/AgentMon%20Start.svg) **AgentMon Start** Organization-wide AI agent spend, security and device fleet TRY NOW →](https://apps.codenotary.com/agentmon-start)
  
  #### [![AgentMon for Enterprise](https://codenotary.com/hubfs/AgentMon%20for%20Enterprise.svg) **AgentMon** Currently monitors more \> 7 million agent interactions/day. TRY NOW →](https://codenotary.com/agentmon)
  
  #### [![AgentX](https://codenotary.com/hubfs/AgentX.svg) **AgentX** Agentic network control middleware. TRY NOW →](https://codenotary.com/agent-network-control)
  
  #### [![Autonomous Security](https://codenotary.com/hubfs/Autonomous%20Security.svg) **Autonomous Security** AI Agents keep your servers secure. TRY NOW →](https://codenotary.com/trust)
- Use Cases
  
  #### [**AI Agent Risk Monitoring** Continuous oversight of autonomous agents across every environment.](https://codenotary.com/use-cases#risk)
  
  #### [**Autonomous Security Operations** Self-healing defenses that detect, contain, and remediate threats.](https://codenotary.com/use-cases#agentops)
  
  #### [**AI Coding Governance & Performance Monitoring** AI-generated code reviewed, tracked, and held to quality standards.](https://codenotary.com/use-cases#performance)
  
  #### [**AI Tool Cost & Usage Optimization** Spend and consumption optimized across every AI service in use.](https://codenotary.com/use-cases#cost)
  
  #### [**AI Tool Security & Policy Enforcement** Approved AI usage enforced with guardrails and policy controls.](https://codenotary.com/use-cases#security#security)
  
  #### [**Shadow AI Governance** Unsanctioned AI tools discovered, surfaced, and brought under control.](https://codenotary.com/use-cases#shadowit)
- [Blog](https://codenotary.com/blog)
- [Press](https://codenotary.com/press)
- Resources
  
  #### [**Integrations** Connect with your favorite tools and platforms. LEARN MORE →](https://codenotary.com/integrations)
  
  #### [**Support** Get help from our dedicated support team. GET HELP →](https://support.codenotary.com)
  
  #### [**Success Stories** Read how customers achieve their goals. READ MORE →](https://codenotary.com/success)
  
  #### [**Learn** Access documentation and learning resources. EXPLORE →](https://codenotary.com/learn)

[Login](https://apps.codenotary.com/auth/login)

[All posts](https://codenotary.com/blog/all)

 Aug 30, 2024

# LitLyx: A Fresh Take on Event Tracking

 By  [blog](https://codenotary.com/blog/author/blog)  ·   3 minute read

[LitLyx](https://litlyx.com/) is making waves as a new event tracking platform. We've explored various analytics tools for our free services, like [sbom.sh](https://sbom.sh), and LitLyx stands out as one of the easiest to use. Even though it's still in its early stages, its integration is already rock-solid, and the user interface provides all the features you would need to start getting valuable insights right away.

One of the standout features of LitLyx is its Python module, `litlyx-sender`, which simplifies adding event tracking to Python applications.

![CN-Assets (7)-1](https://codenotary.com/hs-fs/hubfs/CN-Assets%20(7)-1.png?width=1200&height=630&name=CN-Assets%20(7)-1.png)

## Why LitLyx Stands Out

With so many analytics platforms available, LitLyx distinguishes itself through its simplicity and user-friendly design. It's open-source and offers a free plan that's perfect for smaller projects. To see how it works, you can check out their [live demo](https://dashboard.litlyx.com/live_demo).

![CN-Assets (8)](https://codenotary.com/hs-fs/hubfs/CN-Assets%20(8).png?width=1200&height=630&name=CN-Assets%20(8).png)

### Simple and Effective User Experience

LitLyx lives up to its motto, "Simplicity is the ultimate sophistication," by offering a clean and intuitive interface. Despite its straightforward design, it doesn't skimp out on powerful features. If you’ve ever been overwhelmed by complex analytics dashboards, LitLyx will feel like a relief.

### Real-Time Event Tracking

One of the best features of LitLyx is its real-time event tracking. This means you get instant access to data as events happen, which can be crucial for making timely decisions. For example, if you need to quickly react to user behavior or system issues, LitLyx provides the data you need without delay.

![CN-Assets (9)-1](https://codenotary.com/hs-fs/hubfs/CN-Assets%20(9)-1.png?width=1200&height=630&name=CN-Assets%20(9)-1.png)

### Easy Integration Options

LitLyx supports various programming languages, including JavaScript and Python. This makes it flexible for businesses using different technologies or planning to expand. Whether you're working on a web app with JavaScript or a backend service in Python, it's bound to have a solution that works for you.

## Introducing litlyx-sender: The Python Module for LitLyx

Now, let’s take a closer look at `litlyx-sender`, the Python module designed to make event tracking easier. It allows you to use decorators to automatically track events in your Python code. But how does it work?

### Installation

Getting started with `litlyx-sender` is a snap. Simply install it via pip:

pip install litlyx-sender

### Sending Basic Events

The core functionality of `litlyx-sender` revolves around the `LitLyxSender` class. Here’s how you can use it to send a basic event:

from litlyx\_sender import LitLyxSender

`# Create a sender instance sender = LitLyxSender() # Send a simple event sender.send_event(name="user_signup", metadata={"user_id": "12345", "plan": "premium"})`

This simple setup handles the formatting of events, communication with the LitLyx API, and error management, all internally.

### Customizing Configuration

You can customize various settings with the `LitLyxSender` class to fit your needs:

sender = LitLyxSender(

`url="https://custom.litlyx.com/event", default_pid="your_project_id", default_name="default_event", default_metadata={"app_version": "1.0.0"}, default_website="yourapp.com", default_user_agent="YourApp/1.0" )`

 

These options help tailor the module to your specific requirements.

#### Using Decorators for Event Tracking

The `litlyx-sender` module includes a decorator that lets you easily track function calls as events. Here’s a quick example:

`@sender.event_decorator(name="important_function_called", metadata={"importance": "high"}) def important_function(): # Your function logic here pass`

 

Each time `important_function` is called, an event is automatically sent to LitLyx. This is useful for monitoring user actions or significant system events.

## Example with sbom.sh

Tracking how users interact with your app can provide valuable insights. Using `litlyx-sender`, you can monitor engagement with ease:

`@sender.event_decorator(name="feature_used", metadata={"feature_name": "advanced_search"})`

`def advanced_search(query, filters): # Advanced search logic here pass def log_user_session(user_id, session_duration): sender.send_event(name="user_session", metadata={ "user_id": user_id, "duration_seconds": session_duration, "timestamp": datetime.now().isoformat() })`

 

By tracking feature usage and user sessions, you gain insights into user behavior and can make data-driven decisions. For instance, after integrating with sbom.sh, we started seeing events in the following dashboard within minutes.

![](https://codenotary.com/hs-fs/hubfs/image-png-Aug-30-2024-05-22-20-7530-AM.png?width=869&height=437&name=image-png-Aug-30-2024-05-22-20-7530-AM.png)

## Best Practices for Using `litlyx-sender`

To get the most out of `litlyx-sender`, follow these tips:

- **Consistent Event Naming**: Use clear, consistent names for your events to make it easier to analyze the data.
- **Meaningful Metadata**: Add useful metadata to provide context to your events. This makes your data more actionable.
- **Default Values**: Set default values for common parameters to simplify your code and reduce errors.
- **Error Handling**: While `litlyx-sender` manages many errors automatically, it’s a good practice to use try-except blocks to handle unexpected issues.
- **Smart Use of Decorators**: Only use the event decorator where it makes sense. Not every function call needs to generate an event.
- **Respect User Privacy**: Collect only the data you need and be transparent about your data collection practices to respect user privacy.

## Conclusion

The combination of LitLyx and the `litlyx-sender` module offers a straightforward way to track user behavior and enhance user experience. Whether you’re working on a startup or a large application, LitLyx provides powerful tools without the need for complex consulting. For example, integrating with sbom.sh took just 10 minutes, and we were already seeing valuable data in the dashboard.

[![Share on twitter](https://4059529.fs1.hubspotusercontent-na1.net/hub/4059529/hubfs/01-marketplace/twitter-color.png?width=35&height=35&name=twitter-color.png)](https://twitter.com/intent/tweet?original_referer=https://codenotary.com/blog/litlyx-a-fresh-take-on-event-tracking&utm_medium=social&utm_source=twitter&url=https://codenotary.com/blog/litlyx-a-fresh-take-on-event-tracking&utm_medium=social&utm_source=twitter&source=tweetbutton&text=) [![Share on facebook](https://4059529.fs1.hubspotusercontent-na1.net/hub/4059529/hubfs/01-marketplace/facebook-color.png?width=35&height=35&name=facebook-color.png)](http://www.facebook.com/share.php?u=https://codenotary.com/blog/litlyx-a-fresh-take-on-event-tracking&utm_medium=social&utm_source=facebook) [![Share on linkedin](https://4059529.fs1.hubspotusercontent-na1.net/hub/4059529/hubfs/01-marketplace/linkedin-color.png?width=35&height=35&name=linkedin-color.png)](http://www.linkedin.com/shareArticle?mini=true&url=https://codenotary.com/blog/litlyx-a-fresh-take-on-event-tracking&utm_medium=social&utm_source=linkedin) [![Share on pinterest](https://4059529.fs1.hubspotusercontent-na1.net/hub/4059529/hubfs/pinterest.jpg?width=35&height=35&name=pinterest.jpg)](http://pinterest.com/pin/create/button/?url=https://codenotary.com/blog/litlyx-a-fresh-take-on-event-tracking&utm_medium=social&utm_source=pinterest&media=)

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "blog",
    "url" : "https://codenotary.com/blog/author/blog"
  },
  "dateModified" : "2024-09-03T08:39:48.608Z",
  "datePublished" : "2024-08-30T05:02:51.000Z",
  "headline" : "LitLyx: A Fresh Take on Event Tracking",
  "image" : [ "https://codenotary.com/hubfs/CN-Assets%20(7)-1.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://codenotary.com/blog/litlyx-a-fresh-take-on-event-tracking",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://codenotary.com/hubfs/logo-light.svg"
    },
    "name" : "Codenotary, Inc."
  }
}
```

```json
{
  "@context" : "http://schema.org",
  "@type" : "Article",
  "author" : {
    "@type" : "Person",
    "name" : [ "blog" ],
    "url" : "https://codenotary.com/blog/author/blog"
  },
  "datePublished" : "2024-08-30T05:02:51+0000",
  "description" : "Explore how LitLyx and its litlyx-sender Python module streamline event tracking, offering an efficient solution for analytics and insights in projects.",
  "headline" : "LitLyx: A Fresh Take on Event Tracking",
  "image" : "https://23873599.fs1.hubspotusercontent-na1.net/hubfs/23873599/CN-Assets%20%287%29-1.png",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://cdn2.hubspot.net/hubfs/23873599/logo-light.svg"
    },
    "name" : ""
  },
  "url" : "https://codenotary.com/blog/litlyx-a-fresh-take-on-event-tracking"
}
```