diff --git a/src/components/analytics-shell/analytics-shell.js b/src/components/analytics-shell/analytics-shell.js index 4b5d10de2..916476ab8 100644 --- a/src/components/analytics-shell/analytics-shell.js +++ b/src/components/analytics-shell/analytics-shell.js @@ -61,15 +61,20 @@ AnalyticsShell.defaultProps = { AnalyticsShell.propTypes = { children: PropTypes.node.isRequired, + /** Location object (often provided by Batfish), `pathname` is current page's relative path. */ location: PropTypes.shape({ pathname: PropTypes.string.isRequired }).isRequired, + /** Production website domain. */ domain: PropTypes.string, + /** Customize [Sentry options](https://docs.sentry.io/error-reporting/configuration/?platform=browser). */ sentry: PropTypes.shape({ - // Customize Sentry options: https://docs.sentry.io/error-reporting/configuration/?platform=browser dsn: PropTypes.string }), - webAnalytics: PropTypes.object, // Customize web-analytics options: https://github.com/mapbox/web-analytics - disableSentry: PropTypes.bool, // If true, Sentry will not initialize. - disableWebAnalytics: PropTypes.bool // If true, Mapbox analytics (initializeMapboxAnalytics) will not initialize. + /** Customize [web-analytics options](https://github.com/mapbox/web-analytics). */ + webAnalytics: PropTypes.object, + /** If `true`, Sentry will not initialize. */ + disableSentry: PropTypes.bool, + /** If `true`, Mapbox analytics (`initializeMapboxAnalytics`) will not initialize. */ + disableWebAnalytics: PropTypes.bool }; diff --git a/src/components/analytics-shell/examples/basic.js b/src/components/analytics-shell/examples/basic.js index b2f5cd01f..d6146ca28 100644 --- a/src/components/analytics-shell/examples/basic.js +++ b/src/components/analytics-shell/examples/basic.js @@ -1,5 +1,5 @@ /* -The AnalyticsShell adds [Sentry](https://docs.sentry.io/error-reporting/configuration/?platform=browser) and initializes [@mapbox/web-analytics](https://github.com/mapbox/web-analytics) from [docs-page-shell](https://github.com/mapbox/docs-page-shell#page-shell-scriptjs) +The AnalyticsShell adds [Sentry](https://docs.sentry.io/error-reporting/configuration/?platform=browser) and initializes [@mapbox/web-analytics](https://github.com/mapbox/web-analytics) from [docs-page-shell](https://github.com/mapbox/docs-page-shell#page-shell-scriptjs). */ import React from 'react'; import AnalyticsShell from '../analytics-shell';