analytics icon indicating copy to clipboard operation
analytics copied to clipboard

Plugin function and event handler parameters are not documented

Open dobesv opened this issue 3 years ago • 0 comments

Looking at the docs I don't know what to expect as the parameters to initialize, page, track, and so on.

I do see it's an object with fields like payload, instance, config. But what are those things? I can infer config is the config of my plugin and payload is what was passed to the original track or page call. What is instance ?

When I call analytics.track('some event', { ... payload ... }), where does the event name go? Is it assigned into the payload or somewhere else?

I think I can piece it together by analyzing the code and plugins but it would be nice to beef up the docs in those areas for the benefit of others trying to write some custom plugins.

dobesv avatar Aug 06 '22 00:08 dobesv