Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/analytics-core/src/pluginTypeDef.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @property {function} [page] - Page visit tracking method
* @property {function} [track] - Custom event tracking method
* @property {function} [identify] - User identify method
* @property {function} [reset] - Clear all information about the user & reset analytics state
* @property {function} [loaded] - Function to determine if analytics script loaded
* @property {function} [ready] - Fire function when plugin ready
*/
4 changes: 4 additions & 0 deletions site/main/source/plugins/writing-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export default function providerPluginExample(userConfig) {
identify: ({ payload }) => {
// call provider specific user identify method
},
reset: ({ payload }) => {
// call provider specific reset method
},
loaded: () => {
// return boolean so analytics knows when it can send data to third party
return !!window.myPluginLoaded
Expand Down Expand Up @@ -112,6 +115,7 @@ export default function doNotTrackPlugin(userConfig = {}) {
* @property {function} [page] - Page visit tracking method
* @property {function} [track] - Custom event tracking method
* @property {function} [identify] - User identify method
* @property {function} [reset] - Clear all information about the user & reset analytics state
* @property {function} [loaded] - Function to determine if analytics script loaded
* @property {function} [ready] - Fire function when plugin ready

Expand Down