tode.trackAction()

Track a simple user action in your Figma plugin or widget.

Usage

TypeScript
tode.trackAction('export_clicked');
tode.trackAction('settings_opened');
tode.trackAction('layer_renamed');

Parameters

ParameterTypeRequiredDescription
actionNamestringYesIdentifier for the action

Returns

Promise<void>

Best Practices

Use descriptive snake_case names:

TypeScript
// Good - clear and descriptive
tode.trackAction('export_to_png');
tode.trackAction('layer_renamed');
tode.trackAction('settings_opened');
 
// Bad - too vague
tode.trackAction('click');
tode.trackAction('action1');

Examples

Track button clicks

TypeScript
const handleExport = () => {
  // Perform export logic...
  tode.trackAction('export_clicked');
};

Track feature usage

TypeScript
const openSettings = () => {
  tode.trackAction('settings_opened');
  // Show settings UI...
};

Always check isReady first

TypeScript
if (tode.isReady) {
  tode.trackAction('action_name');
}

See Also

Track your Figma plugin

Sign up to get your API key and start collecting analytics in minutes.

Get your API key