How to get Google Analytics to work for your Single Page Application

One of the things that gets increasingly fascinating the older I get is the new stuff you pick up as you “do things for real”. Right now we have been building a site for my current organisation.

We built a little CMS to drive content and the whole page is a Single Page Application (SPA). As we approached being finished we of course wanted to add Google Analytics to the site. Dead simple.

Or not maybe … in this post I’ll describe how we got it to work for our Single Page Application. Google Analytics default was is not built for that. And many descriptions you will find out there is written based with a client-side framework in mind, like Backbone.js.

What I write about below only requires jQuery, and that’s mostly for convience. As with most things I learn it’s based on others...

Read More

Supertest: Verify database after request

One thing that I often find myself want to do is to check the database after I have created a resource. For example:

  • Post some data to /user
  • Verify that I get 201 Created back
  • Check that the data in the database looks ok

I have had such a hard time finding a stable way to do this. I know that I have a little bit of a special tool chain but still… it should not be this hard.

But last night, after weeks searching for this, I got it to work. I’m so excited to share this with you.


I’m using the following tools:

Read More

Stuff I said coaching

I had the great joy and exciting opportunity to do a agile coach gig the other week. In Kuala Lumpur for Nintex.

It was a really fun time and as usual I learned a lot on the way. I only hope that I could share a lot in the process.

When you’re in front of people… that’s where you all of a sudden find yourself saying things that you have not heard come out of your mouth before. It’s really interesting because it’s like the abstract ideas you have needs to be concertized and then some new things can come out. In another way than before, or emphasized differently.

In this post I wanted to summarize some of the things that I said during the 3 days I spent with the teams there.

Only teaching is not enough

First of all I learned something new about...

Read More

Splitting a Koa app into parts and putting it together again

The little series I’ve written on supertest and other Koa friends is moving very slowly ahead. Lots of new findings is making for a lot of innovation that I need to find out and try out.

But here are the things I’ve written so far:

In this post I will show you a powerful way of using koa-mount to create a very modular application structure. And how to test it, of course.

As before, if you want to tag along as I build this example out, grab the code from this tag, and we’ll start at the same place.

The problem / opportunity

Right now this is a nice little API for users. But what if this starts...

Read More

Order points, value, flow and waste

As I wrote about earlier I’ve just returned from 3 days of coaching at Nintex in Kuala Lumpur.

Once I stood in front of the teams (6 teams, 40 people) and then got a chance to coach them individually I was struck by the trust that Nintex showed me. They really could not check me too close, what I said, how I nudged the teams etc. Me and Christian, their head of engineering, had synced up in emails and other conversations. And we see eye-to-eye on many things… But still. Trust. It’s a good train - get on it!

There was one thing that we talked about in the teams that I didn’t really manage to make my reasoning clear about. It’s pretty common, powerful and interesting so I thought I’d share this idea with you and try to give an better explanation around what I really meant....

Read More

What I've learned from the first 30% of Reinventing Organizations

I’m reading Reinventing Organizations right now and it’s an inspiring read to say the least. Finally someone puts words and structure to what I’ve tried to do, achieve and explain to others.

And the stories about the self-organization, trust-embracing, hierarchy-demolishing, performance-through-the-roof, best-place-to-work-organizations are truly truly amazing.

I’ve several times wiped tears from my face reading these stories. Not because it’s so great but because it comes down to trusting the people in the organization. As one founder of such organization puts it when he describes his organization FAVI:

The organization that believes that mankind is good

I don’t care what they are doing - I want to work there. I know I can belong! Luckily I work for a company, Aptitud, that strives towards this.

But what is common for these organizations?

Mind you I’ve only read 1/3 of the book… this might be answered later and then...

Read More

Supertest: Things I've learned - part I

My favorite thing with blogging is the feedback I get. In fact; that’s the reason I blog. There. I’ve said it. I love to see many read my stuff and get back to me with questions and suggestion. I’m not even ashamed to say so.

Sometimes people even ask me to blog about something. I really love that, even though I’ve have to find time to do so. I got a very nice comment from James Gardner asking me to blog a little more about supertest.

He specifically asked me to show how to “split test into separate files for big APIs”, so I’ll do that in this post.

But that sprung a few ideas about things that I’ve started to use a lot and I thought I’ll do a little mini-series here. Here are some posts I have in mind:

  • Splitting API over several files...
Read More

Why don't they change: what if I could just snap my fingers?

Yes, it’s another post on change management. As a consultant … well that’s basically your job. And most of my engagements are of consultancy type. But change management is very trick to do right, frustrating and … simply wonderfully rewarding if you get it to work.

Sadly this post is describing my frustrations rather than a “one size fit all situation” solution. Of course, since those solutions don’t really exists in reality. Where I work.

I wanted to share a thought that went through my head one day when I was particular frustrated. And then tell you why it was stupid and how I now changed my thinking about this problem / situation.

Yes - it will be great fun. Mmmmmm frustration…

Just kidding but I will try to write this so I can use it as a nice reminder post for when I fall into this reasoning again. Maybe...

Read More

Why don't they change: What would make me behave like that?

I’m starting to realize that the biggest advantage I, personally, will get from my three years in Indonesia is a lot of experience in change management, under some extreme conditions. As I’ve blogged about, twice, I am now in a culture where questioning is not done. It’s not encourage, not praised, not sought for etc. You simply don’t do it.

Again please don’t read that as I think that they are stupid or ignorant - it’s just their culture. There’s a lot of strange things going on in our culture too. Just step outside your own box and you’ll see it.

In fact; that’s what this post is about; stepping out of my box. A simple question that I’ve found very valuable for me to understand “them”.

Getting to the point

First let’s get back to my intro a bit. I think that everything I’ve...

Read More

Please question the process

One of the things that I’ve been told that upset me the most during the last couple of years was this sentence:

Please don't question the process

Instead of going angry and rant about the stupidity of that I’d thought about the opposite. Or what I’d want to do. If I ever get to hire people to a company I will tell them, on their first day:

Please question the process. This is only as good as we've got so far. In fact - one of the big reasons you are here is to make us better. You cannot do that without questioning and challenging the current state.
If you ever feel that something could be done better or in another way - please say so.

Please question the process means that we are humble about that we are not the best we will ever be. It also sends a...

Read More