You found an issue, in the welcome app the analytics library is shiped as 
minified, given that the correct file name is 
analytics.min.js<https://github.com/web2py/web2py/blob/master/applications/welcome/static/js/analytics.min.js>instead
 of 
analytics.js<https://github.com/web2py/web2py/blob/master/applications/welcome/static/js/analytics.min.js>
btw, it is a bit out of date.

Paolo

On Wednesday, July 24, 2013 4:12:34 PM UTC+2, st...@hurlingstats.com wrote:
>
> Wondering if anyone has seen this.
>
> I've set my tracking id in menu.py
>
> response.google_analytics_id = 'UA-XXXXXXXX-X'
>
> When I load my site, I get js errors:
>
> SyntaxError: syntax error
> http://127.0.0.1:8000/mysite/static/js/analytics.js
> Line 4
>
> ReferenceError: analytics is not defined
> http://127.0.0.1:8000/mysite/controller/default
> Line 2682
>
> This is what I have in layout.html
>
>   {{if response.google_analytics_id:}}
>   <script src="{{=URL('static','js/analytics.js')}}"></script>
>   <script type="text/javascript">
>   analytics.initialize({
>     'Google Analytics':{trackingId:'{{=response.google_analytics_id}}'} 
>   });</script>
>   {{pass}}
>
> Using web2py v2.5.1-stable+timestamp.2013.06.06.10.23.23
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to