How to get website metrics from Google Analytics with Flask Python

If you don’t know what Google Analytics does, it is a powerful tool created by Google which uses some scripts to determine all sorts of information about the users accessing your app. This app can be a website, mobile app, script or others that can track information such as location, the number of page loads, browser type, device type etc.