Foros de discusión

Google Analytics integration not working in https pages

thumbnail
Fernando Fernandez, modificado hace 7 años.

Google Analytics integration not working in https pages

Expert Mensajes: 396 Fecha de incorporación: 22/08/07 Mensajes recientes
Hi guys,

I'm having a problem in 6.2 CE GA6.

My site is running over https (using apache httpd to do the hppts offloading) and every time I load a page in Firefox I get this error in the browser console:

Blocked loading mixed active content "http://www.google-analytics.com/urchin.js"[Learn More]
ReferenceError: urchinTracker is not defined


This is blocking the automatic integration between Liferay and Google Analytics.

The error seems to be caused by the new policy in Firefox, to protect the user from loading active content (js, in this case) in http when the page was loaded via https.

I read a couple of article about this and the solution seems to be very simple: use "https:" instead of http or, when possible, just remove the "http:" part from the url.

Now the tricky part: how do I change the Liferay generated urchin loading url from http to https?

I tried to find this string on the sources but couldn't find it. Any ideas?

Thanks in advance

Fernando