title: How to count (unique) custom values for a metric in Google Analytics?
body: <p>Trying to figure out "how many users logged-in last month?" on my website using Google Analytics' web-interface (or API).</p>
  
  <p>For each request, I'm sending user id's in a custom variable as the value:</p>
  
  <pre><code>  _gaq.push(['_setCustomVar', 2, 'user_id', '#{ current_user ? current_user.id : 0 }']);
  </code></pre>
  
  <p><strong>How can I get the number of unique user id's for all pageviews within a certain time-range?</strong></p>