Foren

Google Analytics syntax error??

Baris Sener, geändert vor 14 Jahren.

Google Analytics syntax error??

Expert Beiträge: 278 Beitrittsdatum: 23.06.09 Neueste Beiträge
Hello,

I followed the wiki article about google analytics; I added the code in the wiki page to bottom-exp.jsp. Then I added "$taglibLiferay.include("/html/common/themes/bottom-ext.jsp") " in portal-normal.vm. This is the error I get:

14:07:12,776 ERROR [MinifierUtil:121] 4: 28: unterminated string literal
14:07:12,778 ERROR [MinifierUtil:121] 4: 28: syntax error
14:07:12,778 ERROR [MinifierUtil:121] 5: 6: syntax error
14:07:12,779 ERROR [MinifierUtil:121] 5: 26: missing exponent
14:07:12,779 ERROR [MinifierUtil:121] 5: 29: missing ; before statement
14:07:12,780 ERROR [MinifierUtil:121] 5: 39: missing exponent
14:07:12,780 ERROR [MinifierUtil:121] 5: 40: syntax error
14:07:12,781 ERROR [MinifierUtil:121] 1: 0: Compilation produced 7 syntax errors.
14:07:12,781 ERROR [MinifierUtil:87] JavaScript Minifier failed for
var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js'
type='text/javascript'%3E%3C/script%3E"));


Any ideas?

Baris
thumbnail
Ahmed Hasan, geändert vor 14 Jahren.

RE: Google Analytics syntax error??

Expert Beiträge: 306 Beitrittsdatum: 13.04.07 Neueste Beiträge
You need not have to do all these things now.

you have an UI to set the google analytics ID.

please check, http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Google+Analytics

For any help feel free to contact me,

Ahmed Hasan
CTO, TransIT mPower Labs (P) Ltd.
info@mpowerglobal.com
mPower Global
A Liferay expert company.
Baris Sener, geändert vor 14 Jahren.

RE: Google Analytics syntax error??

Expert Beiträge: 278 Beitrittsdatum: 23.06.09 Neueste Beiträge
Hello,

I saw the UI, but then I have to figure out Google Analytics for each community and organization. I want to have google analytics portal wide. I saw the wiki article, but it didn't work for me.

Baris
karla jett, geändert vor 14 Jahren.

RE: Google Analytics syntax error??

Junior Member Beiträge: 35 Beitrittsdatum: 07.09.09 Neueste Beiträge
HI Baris,
Our site uses the same UA for all the communities.. So if you wish you can use same UI in all the communities(equals portal wide configuration) and then if you like, you can create separate profiles in analytics for separate reports.
Baris Sener, geändert vor 14 Jahren.

RE: Google Analytics syntax error??

Expert Beiträge: 278 Beitrittsdatum: 23.06.09 Neueste Beiträge
Without having to put google analytics ID one by one for each community?

Baris
karla jett, geändert vor 14 Jahren.

RE: Google Analytics syntax error??

Junior Member Beiträge: 35 Beitrittsdatum: 07.09.09 Neueste Beiträge
I am sorry if i was not clear,
nope, we have configured it one by one in all communities( we have 3 communities).

May be you are hitting http://issues.liferay.com/browse/LPS-1814 ??
Baris Sener, geändert vor 14 Jahren.

RE: Google Analytics syntax error??

Expert Beiträge: 278 Beitrittsdatum: 23.06.09 Neueste Beiträge
Well right now, it is not giving me any more errors. Does Google start tracking right away?

Baris
thumbnail
panchatcharam siva, geändert vor 8 Jahren.

RE: Google Analytics syntax error??

New Member Beitrag: 1 Beitrittsdatum: 19.08.14 Neueste Beiträge
I like to Disable Google Analytics. Becuase am getting below error while start up of server

INFO: Got Exception fetching http://www.google.com/ig/lib/libga.js - 5000ms
org.apache.http.conn.ConnectTimeoutException: Connect to www.google.com/216.58.220.36:80 timed out


Am able to download javascript file in the same browser (http://www.google.com/ig/lib/libga.js)
and below are the setting i have currently
Site Settings
Analytics

Google Analytics ID
<I didnt give any Id for the same>

Piwik
<I didnt give any Id for the same>
thumbnail
Manish Yadav, geändert vor 8 Jahren.

RE: Google Analytics syntax error??

Expert Beiträge: 493 Beitrittsdatum: 26.05.12 Neueste Beiträge
Check whether its blocked by your internet proxy , try to open URL in your browser http://www.google.com/ig/lib/libga.js
It seems you are getting connection time out error because of internet proxy..
In order to disable google Analytics you have to remove google analytics javascript code