Track Custom Events

Track custom information or user actions in your Flutter app

πŸ“˜

LogRocket Flutter support is currently in Alpha

Use the Custom Events API to track custom event measurements about your users' in-app behavior.

await LogRocket.track(LogRocketCustomEventBuilder('testEvent'));

You can then search for sessions containing these events using a Custom Event filter in the LogRocket Dashboard:

You can optionally provide additional properties that will be associated with the event. All supported property types are listed here:

var event = LogRocketCustomEventBuilder('testEvent');

event.putRevenue(24.99);
event.putInt("productSku", 488736929);
event.putString("productCategory", "Clothing");
event.putBool("couponApplied", true);
event.putDouble("unitWeight", 1.2);
event.putListString("customerSegments", ["aef34b", "97cb20"]);
event.putListInt("quantities", [1, 8, 12]);
event.putListBool("quantityShipsFree", [false, true, true]);
event.putListDouble("discounts", [1.99, 2.99]);

await LogRocket.track(event);

There are a few limits to keep in mind when providing properties to Custom Events:

  • Property names must be under 100 characters.
  • A maximum of 2000 properties may be uploaded per session. Properties over this limit will not be recorded.

πŸ“˜

'Revenue' Property

The 'revenue' property is a special property that you can use to pass data into our funnels. For more information, see here.