title: How to pass user ID in Javascript function in wordpress?
body: <p>I'm trying to get the current users ID and pass it as a variable into a javascript function (see "USER_ID_GOES_HERE"). Whats the best practice for doing so?</p>
  
  <p>here is my function:</p>
  
  <pre><code>function hide_loading() {
  Wild.onChartsReady(function() {
    var series = new Wild.Series("Viewed Post", {
      analysisType: "count",
      timeframe: "this_week",
      interval: "daily",
      groupBy: "title",
      filters: [{"property_name":"author","operator":"eq","property_value":'USER_ID_GOES_HERE'}]
    });
    series.draw(document.getElementById("mine"), { lineWidth: 2 });
  });
  }
  </code></pre>