In our website, we need to send an event with an event value on some pages when the page is loaded.
When we've added the following code to the bottom of our page (after the google analytics script) we don't receive any event record on Google analytics reports.
<script>
ga('send', 'event', 'Showed a page', 'Showed a page', 'Page Type', 12);
</script>
where the 12 is an example event value.
We get the events triggered when they're connected to onClick event of something but couldn't find the optimised way of doing it on page load.