Enable and disable analytics
These docs cover Amplify Gen 1. For new web apps, we recommend the latest AWS Amplify, with a simplified CLI and native integrations for databases, storage, and AI models. Get started with the latest AWS Amplify.
Disable Analytics
Analytics is enabled by default when you configure it in your app. To disable Analytics in your app use the disable function:
import { disable } from 'aws-amplify/analytics';
disable();Enable Analytics
To enable analytics you can use the enable function in your app:
import { enable } from 'aws-amplify/analytics';
enable();