title: Google Analytics 4 - Measurement Protocol API used without gtag.js or firebase
body: <p>Is it possible to use GA4 Measurement Protocol to send events to Google Analytics and view and analyze them in the GA dashboard <strong>without</strong> using <code>gtag.js</code> or any other front-end script? The use case would be that some events are being sent to my server and I will just push these events to GA through the API.</p>
  <p>One thing that makes me think is that the official Measurement Protocol API say:</p>
  <blockquote>
  <p>In order for an event to be valid, it must have a client_id that has already been used to send an event from gtag.js. You will need to capture this ID client-side and include it in your call to the measurement protocol. In send an event to your property, we use &quot;client_id&quot; as the client_id. You will need to replace this with a real client_id that comes from gtag.js.</p>
  </blockquote>
  <p>(<a href="https://developers.google.com/analytics/devguides/collection/protocol/ga4/verify-implementation?client_type=gtag" rel="noreferrer">https://developers.google.com/analytics/devguides/collection/protocol/ga4/verify-implementation?client_type=gtag</a>)</p>
  <p>That suggests that only events that have a valid <code>client_id</code> that originate from <code>gtag.js</code> will be counted.
  I did some experimenting with randomly generated <code>client_ids</code> and what I discovered was that I was able to see my events in the <code>Realtime</code> section of the GA4 console (the <code>Event count by Event name</code> section), but all the other sections would be empty and the <code>Users in last 30 min</code> section would always show 0.</p>
  <p>Can someone please explain to me why it's zero and if such a use case is valid at all? Thanks</p>