microsoft / docusaurus-plugins

Plugins for Docusaurus and Rise4Fun
https://microsoft.github.io/docusaurus-plugins/
MIT License
12 stars 2 forks source link

Widen app insights configuration options. Add optional click analytics plugin instantiation. #39

Closed scalvert closed 1 year ago

scalvert commented 1 year ago

Summary

The current implementation didn't correctly mirror the entire list of configuration parameters that can be used with App Insights. This PR widens the configuration options, and also adds the optional instantiation of the click analytics plugin.

The new configuration structure is:

type Options = {
  config: ApplicationInsightsConfig;
  enableClickAnalytics?: boolean;
};

This doesn't expose a way to add more app insights extensions currently, but that will be added as needed/requested.

ℹ️ This change is backwards compatible with the old method of passing configuration.

scalvert commented 1 year ago

Just waiting on https://github.com/microsoft/ApplicationInsights-JS/issues/2061 to be released in order to fix the outstanding issue.