Making a tap multiplier

How should I make a money multiplier like in Cookie Clicker? I need my multiplier to go up when the player starts tapping faster.

  1. Measure the clicks per second
  2. Multiply with whatever factor you want

Click this for clicks per second