Legacy Knowledge Base
Published Jul. 2, 2025

Setting up Google Analytics to work with Liferay DXP 7.2

Written By

Justin Mann

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

Issue

  • Setting up Google Analytics to work with Liferay DXP 7.2 is easy and is described in our documentation here. However, there is some setup that is required on the Google Analytics side so that the two can work together.

Environment

  • Liferay DXP 7.2
  • Google Analytics

Resolution

  1. Go to analytics.google.com and in the Admin tab, create a new Account1.png
  2. In Account setup, add an Account Name (e.g. Liferay Test) and then unselect the data sharing options and then click Next2.png
  3. Under Property setup, provide a Property Name (e.g. Test) and then show advanced options. Enable "Create a Universal Analytics Property" and add your website URL, then select Next3.png
  4. Under "About your business", select Create, and then accept the Terms4.png
  5. Select the Accounts tab near the top of the page and change the account to the one that was just created5.png
  6. Go to Admin tab, and under Property -> Tracking Info, select Tracking code6.png
  7. Copy the Tracking ID that is shown7.png
  8. Go to Realtime -> Overview to view the page statistics8.png
  9. Start your Liferay bundle, and then go to Site -> Configuration -> Settings -> Advanced and the Tracking ID that you copied to the Google Analytics ID field9.png
  10. Google Analytics now tracks that a user is accessing the page and can track page views10.png

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base