website logo
⌘
K
Introduction to Qualetics
Getting Started with Qualetics
Creating your account
Connecting your data
Data Streaming
Data Objects
Example Data Events & Objects
Automatic Data Capture
Custom Event Data
Error Monitoring
SDK For Data Streaming
JavaScript
Angular
React
React-Native
Rest API
Android
Qualetics for WordPress
Analytics
Activity Analytics
User Analytics
Exception Analytics
Features Overview
API Key Management
Features for Insights
Dashboards
Quick Look
User Management
User Groups
Dynamic Home Pages
Docs powered by
Archbee
Data Streaming

Example Data Events & Objects

4min

Summary

The document provides sample code for tracking user events in a system using JavaScript. It includes samples for logging in, logging out, and a custom event for a product purchase. Each sample includes information about the actor/user, action, context, and object involved in the event.

— AI Generated

Login - When an Actor (User) Logs into the system

JS
|
{
   "actor":{
      "type":"User",
      "id":"123",
      "attributes":{
         "student":{
            "name":"<user_full_name>"
         }
      }
   },
   "action":{
      "name":"Login"
   },
   "context":{
      "name":"Login",
      "attributes":{
         "referrer":"{referrer_url}",
         "is_authenticated":true
      }
   },
  "object":{
     "type":"User",
     "name":"John Doe",
     "attributes":{
         "email":"john@doe.com"
      }
   }
}



Logout

JS
|
{
   "actor":{
      "type":"User",
      "id":"123",
      "attributes":{
         "student":{
            "name":"<user_full_name>"
         }
      }
   },
   "action":{
        "type":"Logout",
      "name":"Timed Logout"
   },
   "context":{
      "name":"Product Details",
      "attributes":{
         "Product Title":"Samsung Television",
         "is_authenticated":false
      }
   },
   "object":{
     "type":"User",
"name":"John Doe",
      "attributes":{
         "email":"john@doe.com"
      }
   }
}



Custom Event - Product Purchase

JS
|
{
   "actor":{
      "type":"User",
      "id":"123",
      "attributes":{
         "student":{
            "name":"John Doe"
         }
      }
   },
   "action":{
       "type":"Transaction",
      "name":"Product Purchase"
   },
   "context":{
      "name":"Product Details",
      "attributes":{
         "Category":"Televisions"
      }
   },
   "object":{
     "type":"Television",
     "name":"Samsung 123",
      "attributes":{
         "Screen Size":"60 Inches",
         "Screen Type":"OLED"
      }
   }
}





Updated 24 Jul 2023
Did this page help you?
PREVIOUS
Object
NEXT
Automatic Data Capture
Docs powered by
Archbee
TABLE OF CONTENTS
Login - When an Actor (User) Logs into the system
Logout
Custom Event - Product Purchase
Docs powered by
Archbee
Copyright @ 2022 All Rights Reserved | Qualetics Data Machines Inc.