Google Analytics - less than n minutes ago
<p><a href="https://developers.google.com/analytics/devguides/reporting/realtime/dimsmets/" rel="noreferrer">Google Analytics Realtime</a> provides <code>rt:minutesAgo</code>, on which one could filter queries.</p>

<p>However, it being a dimension and not a metric, <code>&lt;=</code> cannot be used in the filter.</p>

<p>Assuming I want to get some numeric metric (like <code>rt:totalEvents</code>) for the last <em>n</em> minutes, what would be the best way to do this?</p>

<hr>

<p>Currently, the only idea that I have is to create a regex, which matches numbers &lt;= <em>n</em>, use <code>=~</code> and then sum all <code>rt:totalEvents</code> in the result set. This sounds wrong on so many levels.</p>