Avatar of Sarah Ward
Sarah Ward
Flag for United States of America

asked on 

Google Analytics / JavaScript: Get Client ID

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


    ga('create', 'UA-123456789-1', 'auto');
    ga('send', 'pageview');
    ga(function(tracker) {
      /* Your other code here */


Open in new window

What am I missing?  Any help would be appreciated.  Thanks!

Avatar of undefined
Last Comment
Michel Plungjan

8/22/2022 - Mon