留言板

Google Analytics syntax error??

Baris Sener,修改在14 年前。

Google Analytics syntax error??

Expert 帖子: 278 加入日期: 09-6-23 最近的帖子
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,修改在14 年前。

RE: Google Analytics syntax error??

Expert 帖子: 306 加入日期: 07-4-13 最近的帖子
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,修改在14 年前。

RE: Google Analytics syntax error??

Expert 帖子: 278 加入日期: 09-6-23 最近的帖子
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,修改在14 年前。

RE: Google Analytics syntax error??

Junior Member 帖子: 35 加入日期: 09-9-7 最近的帖子
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,修改在14 年前。

RE: Google Analytics syntax error??

Expert 帖子: 278 加入日期: 09-6-23 最近的帖子
Without having to put google analytics ID one by one for each community?

Baris
karla jett,修改在14 年前。

RE: Google Analytics syntax error??

Junior Member 帖子: 35 加入日期: 09-9-7 最近的帖子
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,修改在14 年前。

RE: Google Analytics syntax error??

Expert 帖子: 278 加入日期: 09-6-23 最近的帖子
Well right now, it is not giving me any more errors. Does Google start tracking right away?

Baris
thumbnail
panchatcharam siva,修改在8 年前。

RE: Google Analytics syntax error??

New Member 发布: 1 加入日期: 14-8-19 最近的帖子
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,修改在8 年前。

RE: Google Analytics syntax error??

Expert 帖子: 493 加入日期: 12-5-26 最近的帖子
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