Get StartedCustom Events

Custom Events

Track specific user interactions in your application using Lynq’s custom events. The track() function lets you capture actions like button clicks, purchases, or form submissions.

Basic Usage

First, ensure you’ve set up Lynq tracking. Then use the following syntax to track events:

lynq.track("login");

The lynq object is available globally on window, making it accessible throughout your code

Adding Event Properties

Need to include additional details? Pass an object as the second argument:

lynq.track("Subscription", { type: "Monthly" });

Property Restrictions

Event properties must follow these rules:

  • No nested objects or arrays
  • Only accepts: string, number, boolean, and null values