Custom Events
Trigger events when needed for more granular analytics
Beyond automatic page view tracking, PluginPulse allows you to track specific feature usage in your plugin. This helps you understand which features are most popular and how users interact with your plugin.
Adding Custom Event Tracking
The PluginPulse script adds a global pluginpulse()
function that you can call to track custom events:
Parameters
plugin_id
Yes
Your PluginPulse plugin ID
"1706526741286x876166435619471400"
event_type
No
Type of event (default: "page_view")
"feature"
event_name
No
Name of the event/feature (default: "Page View")
"Export PDF"
payload
No
Custom JSON data for additional context
{format: "pdf", pages: 5}
Event Types
PluginPulse supports two event types:
page_view: Used for tracking page/screen views
feature: Used for tracking feature usage and interactions
error: Used for tracking errors
Best Practices
When to Track Events
PluginPulse is flexible enough that you can track any event you feel important enough to monitor. So key events could include:
Feature Activation: When a user activates a feature
Success/Failure: Track outcomes of actions
Configuration Changes: When settings are modified
Payload Best Practices
Keep payloads small and focused
Avoid personally identifiable information (PII)
Use consistent naming conventions
Include success/failure status when applicable
Consider adding timestamps for long-running operations
Implementation Examples
Tracking within an Action
Tracking element settings
Error tracking
For tracking errors in your plugin
Data Dashboard
All custom events appear in your PluginPulse dashboard alongside page views, allowing you to:
Compare feature popularity
Identify error patterns
Understand user workflows
Make data-driven decisions for future development
Remember that events are only tracked in test environments by default.
Last updated