This documentation is not specific to liferay but can be used with reference to any web application.
Liferay provides Google Analytics(referred as GA ahead) by default,after configuring Analytics id GA-##### in Site settings.But this provides limited functionality,only allowing to track page views(Page title and URL).In order to expand it further,we can either embed GA script directly onto the site theme to trigger the required events or use GTM.