Implementing Google Analytics
Google Analytics allows you to evaluate and analyze your customers' behavior, user experience, online content, device performance, and a variety of other factors. Google Analytics has a massive number of reports available.
There are primarily two popular options when it comes to adding Google Analytics to your Drupal website. The easiest one is by installing the contributed module with the same name, Google Analytics (https://www.drupal.org/project/google_analytics), while the other option is to use Google Tag Manager. So, let's see how to set up both.
Before anything else, you need to create a Google Analytics account and obtain your web property tracking ID, if you haven't yet done so. Please navigate here for more detailed instructions: https://support.google.com/analytics/answer/1008015.