Notes and anecdotes

Techstuff rambling

Access Google Analytics API with OAuth token

Notes on adding a Google Service worker that enables you to query Google Analytics with an access token.

Getting started with Hubot + Slack

If Custom Slash commands weren’t enough for you, or if you are trapped behind a firewall without the option to make public endpoints, bots are a great way to make custom integrations with Slack. Anything you can program is doable to integrate with Slack, let me show you and get you started.

Track custom events with google analytics

Requirements: You have an existing google analytics account You have a webpage to track events with How: Edit: If you’re on ES6 with webpack or similar, checkout this Github Gist instead. 1. You include google analytics in your page (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=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’); // Replace UA-XXXXXXX-X with your google analytics user key ga(‘create’, ‘UA-XXXXXXX-X’, ‘ntnu.no’);…

Continue Reading