<Analytics />
Live example: Storybook
This <Analytics />
component is part of Availity's toolset for tracking user interactions and page views in your application. For a helpful overview of how to setup these tools, read our Setting Up Logging guide. Logging in a React application at Availity involves imports from this React focused @availity/analytics package and from @availity/analytics-core. Starting with the Setting Up Logging guide will give you a better understanding of how they work together.
For a detailed understanding of how analytics logging works, you will find it helpful to read these docs on the AvAnalytics class, since <Analytics />
implements an instance of AvAnalytics
, and most of the props are forwarded directly to it.
For access to the underlying AvAnalytics instance in your React application, use the useAnalytics hook. This allows you to manually track events, which does not have the same limitations as auto tracking events.