by Doug

07/05/2015

Implementation of Google Analytics

ConversionWorks Hackathon

We were invited to the first GA Premium Reseller Hackathon in London recently. This was a great event and inspired us to finish what we started. Last week we ran our own hackathon based on measurement of ‘The Internet Of Things’.
The Internet Of Things is massively important – you’ll see a lot more of this in the next 12 months but it’s not necessarily a hard thing.

No.

We’ve demonstrated how simple, cheap hardware can be easily integrated using a simple measurement platform like Google Analytics

To set the scene, watch the brainstorm:

The Brainstorm:

We bought a WeMo motion & switch and used it to measure the usage of our new meeting room. We decided to use IFTTT to power the GA integration as well as using the native functionality of the hardware. We wanted a physical notification that the meeting room was in use as well as a realtime and historical record of the meeting room usage.

Here’s how we put the solution together:

Testing the hardware:


We plugged the devices in. We registered them on the iOS app and saw that we could trigger a desk fan in one room using motion detected in the meeting room. So far, so good!

Now for the clever bit!

The integration:

We used a built in IFTTT recipe to update a Google Doc if the motion detector was activated after 30 seconds of inactivity. This seemed handy for testing but also pretty reasonable when judging if the room was empty after a meeting.

This functionality gave us the historical record of meeting room usage. We wrote no code. Awesome! A physical thing measured using a spreadsheet in the cloud. Easy!

We could have written some script to send a measurement protocol request to GA when the doc was updated. Indeed, we looked into this but then Chris saw something and had a super smart idea. IFTTT can download a file to upload to the Google Drive. Hmm?

What if the download (an http request by any other name) was just a request to Google Analytics in the form of a regular collect request? Light bulb!

Simple. No. Code. Fantastic!

Does it work? See for yourself:

End to end testing part 1:

End to end testing part 2:

Yep – we used a little bit of ChromeCast and the GA Embed API in there too. Is the data any good? You bet!

Okay, there’s a little sneak preview of the ‘Relabelling Machine’ in that screenshot – I couldn’t resist! More on that soon…

The full CW Hackathon playlist is available here: CW Hackathon

Try it yourself – run a hackathon and build something cool and innovative. There are some easy to follow and neat techniques we tried out that we’ll certainly use again.

Comments

Leave a comment

Your email address will not be published. Required fields are marked *