Pre-Requisites

Before proceeding, ensure you:

1

Have installed Vue

Get started here

2

Get your project ID

Sign up on Litlyx Dashboard and create a new project.

1. Install

Choose your package manager & install the library.

2. Import

Now import litlyx in your entry-point file. Normally in Vue 2, it is called main.vue or if you use Vue 3 app.vue.

javascript
import { Lit } from "litlyx-js"

3. Initialize

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

javascript
Lit.init("your_project_id");

This line of code will immediately start collecting web analytics such as: Page Visits, Real-Time Users, Referrers, Bounce Rate, Countries, Unique Visitor Sessions, OS & Devices.

4. Collect Custom Events

To customize your experience, add the following line in each function you desire. There is no limit to the number of events.

javascript
Lit.event("your_event_name");

If you want to exercise more control over your events, you can use the metadata field.

javascript
Lit.event("your_event_name", metadata: { 
  'type': 'MAIN_CTA', 
  'priority': 0.9
});

In your dashboard, you can group them in the Events tab with the Event Metadata Analyzer.

5. Your turn now!

Use litlyx in your Vue 2 or Vue 3 app at ease.