Custom Events
Tracks Customized Analytics with minimal setup.
Fire Your First Event with cURL
Want to quickly see how Litlyx works with events? Use the cURL command below to send a test event. Just replace the project_id
with your actual project ID in your terminal.
curl -X POST "https://broker.litlyx.com/event" \
-H "Content-Type: application/json" \
-d '{
"pid": "project_id",
"name": "testEvent1",
"metadata": "{\"test\": \"something\"}",
"website": "something",
"userAgent": "something"
}'
To get your project_id
, Create your project on Litlyx Cloud.
Minimal Setup
Ensure you alreaady initialized the library in your entry point.
Next, add the following line of code, in each key function
you would like to track.
Lit.event("click-on-buy");
To get your project_id
, Create your project on Litlyx Cloud.
Metadata
Sometimes just an event name
isn’t enough. If you want to add more control to your data, you can use the metadata
field. Like this:
Lit.event("click-on-buy", metadata: {
"product_id": "1",
"customer_id": "customer_id_1",
"price": 1999.99,
"product_name": "Design Chair with a cute cat!"
});
Ready to go!
Analyze all yours custom events
in the Events
tab on the cloud dashboard. Interact with the charts or analyze your metadata with our Events Metadata Analyzer
.