- Posts: 4
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Google Analytics will never work?
- liamh121
- Topic Author
- Offline
- New Member
Less
More
8 years 7 months ago #125670
by liamh121
Google Analytics will never work? was created by liamh121
Hi all,
Completed all the steps and we've never been able to get GA to work. Any ideas? We are using a custom template so I add the call script into start page. Still nothing. Link .
Thanks,
Liam
Completed all the steps and we've never been able to get GA to work. Any ideas? We are using a custom template so I add the call script into start page. Still nothing. Link .
Thanks,
Liam
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11645
- Thank you received: 2739
8 years 7 months ago #125671
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Google Analytics will never work?
What means "nothing" exactly? That Google Analytics doesn't count visits?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- gabrieljenik
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 272
- Thank you received: 45
8 years 7 months ago #125673
by gabrieljenik
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .
Replied by gabrieljenik on topic Google Analytics will never work?
I have seen there are some errors that make JS crash:
636898:17 Uncaught SyntaxError: Unexpected token ,
template.js:1 Uncaught SyntaxError: Unexpected token <
I suggest to review the changes done in the template.
636898:17 Uncaught SyntaxError: Unexpected token ,
template.js:1 Uncaught SyntaxError: Unexpected token <
I suggest to review the changes done in the template.
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .
The topic has been locked.
- ryanf
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
8 years 6 months ago #126061
by ryanf
Replied by ryanf on topic Google Analytics will never work?
I kept getting the "Unexpected token <" error when {GOOGLE_ANALYTICS_JAVASCRIPT} was used. Tried a variety of solutions, none worked.
Added this to template.js and tracking now works. Change the XXXXX to your GA account ID.
(function(i,s,o,g,r,a,m){i=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXX-X', 'auto');
ga('send', 'pageview');
Added this to template.js and tracking now works. Change the XXXXX to your GA account ID.
(function(i,s,o,g,r,a,m){i=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXX-X', 'auto');
ga('send', 'pageview');
The topic has been locked.
- DenisChenu
- Online
- LimeSurvey Community Team
Less
More
- Posts: 13636
- Thank you received: 2491
8 years 6 months ago #126065
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Google Analytics will never work?
Hi,
Try this in your config.php file:
Try this in your config.php file:
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.