I'm working in WordPress and I have this block of JS code on my page. I'm trying to write the Google Analytic Client ID in the console, however, I'm getting the following console error:
Uncaught ReferenceError: ga is not defined
<script> ga('create', 'UA-123456789-1', 'auto'); ga('send', 'pageview'); ga(function(tracker) { console.log(tracker.get('clientId')); /* Your other code here */ });</script>