How does contribution points work?

Sometimes when levelling up you get no point added at all, is that all random? My character has died several times and levelled up but i don't know what was increased...