Foren

Google Analytics GUI Config not sending data to Google

Schalk Neethling, geändert vor 13 Jahren.

Google Analytics GUI Config not sending data to Google

New Member Beiträge: 20 Beitrittsdatum: 10.12.09 Neueste Beiträge
Hi there,

We are running Liferay community edition 5.2.2 and are using Google Analytics to track visitors. As we have two communities using the same theme but different tracking ID's we opted for the GUI configuration option as mentioned here: http://goo.gl/XrYe

When logging into the Analytics account one of the two communities does show that data is being received but for the other, it does not pick up the installed tracking code. The two communities are accessed from different URL's however.

Is there anything that needs to be included in the theme to enable Liferay to inject the analytics code? Will one see the analytics code on the page in the same way as when you add the analytics code directly to the theme or, does Liferay do a call from the back-end when pages in the community is hit?

Any and all information will be much appreciated,
Schalk
Schalk Neethling, geändert vor 13 Jahren.

RE: Google Analytics GUI Config not sending data to Google (Antwort)

New Member Beiträge: 20 Beitrittsdatum: 10.12.09 Neueste Beiträge
I have found the problem and therefore will answer my own question ;)

Even when using the GUI option to enable Google Analytics via Liferay, you still need to add the following line of code in your portal_normal.vm just before the closing </body> tag:


$theme.include($bottom_include)


Hope this helps someone else out that are pulling out their hair....
thumbnail
Milen Dyankov, geändert vor 13 Jahren.

RE: Google Analytics GUI Config not sending data to Google

Regular Member Beiträge: 171 Beitrittsdatum: 23.09.09 Neueste Beiträge
If you need a better control on Google Analytics code or simply need to use the newest version, you may find this plug-in useful.
Have a look at this blog post for more details.