Setting up Google Analytics to work with Liferay DXP 7.2
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
- Go to analytics.google.com and in the Admin tab, create a new Account
- In Account setup, add an Account Name (e.g. Liferay Test) and then unselect the data sharing options and then click Next
- 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 Next
- Under "About your business", select Create, and then accept the Terms
- Select the Accounts tab near the top of the page and change the account to the one that was just created
- Go to Admin tab, and under Property -> Tracking Info, select Tracking code
- Copy the Tracking ID that is shown
- Go to Realtime -> Overview to view the page statistics
- Start your Liferay bundle, and then go to Site -> Configuration -> Settings -> Advanced and the Tracking ID that you copied to the Google Analytics ID field
- Google Analytics now tracks that a user is accessing the page and can track page views
Did this article resolve your issue ?