I reported this issue a year ago: https://groups.google.com/forum/#!searchin/web2py/analytics%7Csort:date/web2py/1_kCqFydZd8/kvywhYKUAQAJ
Nobody replied to my post :) Recently, I upgrade to the analytics.min.js in 2.17.2, still does not work. So i am still using the analytics.min.js in 2.8.1. works very well. On Tuesday, February 5, 2019 at 11:36:27 PM UTC-8, Константин Комков wrote: > > Hello! > I tried to include google analytics like that: > db.py > >> response >> <http://192.168.20.184/examples/global/vars/response>.google_analytics_id = >> configuration.get('google.analytics_id') >> >> 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}} > > appconfig.ini > >> [google] >> analytics_id = XX-XXXXXXXXX-X > > and I cannot have result. If I use standart google method all work: > >> <!-- Global site tag (gtag.js) - Google Analytics --> >> <script async src=" >> https://www.googletagmanager.com/gtag/js?id=XX-XXXXXXXXX-X"></script> >> <script> >> window.dataLayer = window.dataLayer || []; >> function gtag(){dataLayer.push(arguments);} >> gtag('js', new Date()); >> gtag('config', 'XX-XXXXXXXXX-X'); >> </script> > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.