Skip to content

Latest commit

 

History

History
71 lines (54 loc) · 1.54 KB

universal.mdx

File metadata and controls

71 lines (54 loc) · 1.54 KB
title description
Easy Setup
Track web analytics and custom events anywhere JavaScript is supported, all within seconds.

Hero Light Hero Dark

Pre-Requisites

Before proceeding, ensure you: Sign up on Litlyx and create a new project.

1.a - Universal Setup (in just 30 seconds)

With a simple line of code in your index.html, under the body tag, you can start tracking analytics such as Page Visits, Real-Time Users, Referrers, Bounce Rate, Countries, Unique Visitor Sessions, OS & Devices.

<script defer data-project="project_id_here" 
src="https://cdn.jsdelivr.net/gh/litlyx/litlyx-js/browser/litlyx.js">
</script>

1.b - Using any package manager

Install Litlyx library from your favourite package manager.

```bash npm npm install litlyx-js ``` ```bash yarn yarn add litlyx-js ``` ```bash pnpm pnpm add litlyx-js ``` ```bash bun bun install litlyx-js ```

Now import litlyx in your entry-point file.

import { Lit } from "litlyx-js"

Next, initialize Litlyx library with your project in your entry-point file as follow:

Lit.init("your_project_id");

Ready to go!

Explore Litlyx's Dashboard with your web analytics collected in real-time.