i've replaced an earlier package that writes for the "ga.js" library with `g_analytics_writer` - a unified way to generate *simple* tracking analytics for "Google Analytics" in Pyramid apps.
It offers a unified API for 'telling the package what to track', then will generate optimized analytics tracking code for any of 3 available versions (ga.js, analytics.js, gtag.js) I would love some feedback on the alpha release before I push a regular version to PyPi https://github.com/jvanasco/g_analytics_writer for pyramid, you just configure environment.ini with: g_analytics_writer.account_id = UA-123123123-1 include the package: config.include('g_analytics_writer') which will add a `g_analytics_writer` object to the pyramid request. and update template with (mako): ${request.g_analytics_writer.render()|n} It supports custom variables, ecommerce transactions, simple events, sending to multiple trackers and some other things. it's fully tested and works on Python 2 & 3. This has been a bit of a pain to write, as I had to do a lot of testing to figure out how to minimize the amount of external API calls on each platform. This was written to handle our concerns/needs on an upgrade/migration from `ga.js`, but I'd be happy to extend the capabilities if I have time (or take PRs) -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/75d758ad-990a-4a43-9cae-b6b765c70e4c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.