Web analytics is the measurement and analysis of internet data to understand and optimize website usage. It involves both on-site analytics, which measure visitor behavior on a website, and off-site analytics, which analyze a website's potential audience and online visibility regardless of ownership. Key performance indicators are metrics used to evaluate success, such as visits, pageviews, and conversion rates. Google Analytics is a commonly used tool that uses first-party cookies and JavaScript code to collect visitor data and provide reports on acquisition, behavior, and conversions.